Advertisement:

Author Topic: Child Them Issue  (Read 288 times)

Ben Zene

  • Newbie
  • *
  • Posts: 3
Child Them Issue
« on: March 08, 2019, 12:49:31 am »
Using Osclass 3.8 - with osclasswizards theme:
Child theme created & works only the "home" page only - Changes to header.php & footer.php are only recognized on Home page. Child them folder (mychild) created with no dashes - index.php, header.php, footer.php, & functions .php (with osc_enqueue_style('main', 'oc-content/themes/mychild/css/style.css'); only) and a subfolder inside that mychild folder with a style.css file (with my css changes).

have tried:
yes child theme is activated
to reload a fresh version of osclasswizards theme (just in case of corruption)- no change
to rename the style.css to main.css & adjust the functions enqueue to match
have moved the mychild theme PHP & CSS files to the osclasswizards folder (replacing the originals to test) and everything works fine like I'd like the child theme to work

have spent a week trying to figure it out on this forum, stackoverflow  & a few others with no resolve - PLEASE  help

Have made child themes for my websites in WordPress that function fine - newbie with Osclass - minimal experience with PHP

BZ - Thank you

Ben Zene

  • Newbie
  • *
  • Posts: 3
Re: Child Them Issue
« Reply #1 on: March 08, 2019, 02:02:11 am »
Correction: in the child theme - i changed the main.php  - <?php osc_current_web_theme_path('header.php') ; ?> & <?php osc_current_web_theme_path('footer.php') ; ?> to <?php include 'header.php'; ?>  &  <?php include 'footer.php'; ?>

Sorry, so many attempts to get child theme to work over the past week......
I guess that means mychild is activated, as my header & footer are used per child theme main.php - as my changes are present - but seem to be overridden by the main theme on other pages.

Time for a break....

Ben Zene

  • Newbie
  • *
  • Posts: 3
Re: Child Them Issue
« Reply #2 on: March 09, 2019, 04:18:01 am »
After another attempt from scratch & trying a new child with a Bender theme  - I noticed my CSS from the child theme on the page, however my header.php & footer.php ( the ones I changed the most) would not show using my child theme(s).

I noticed that there are not really new updates on building a child themes (most were 4 years old) & a few different methods in forums & youtube. Conflicts on the functions folder, inc.functions, naming issues, following the osclass documentation to create a child theme did not work for me & some suggested having to modify to many php files, it may be easier to "The easiest way to start creating your own theme, is modifying an existing one." I did not state in the original question that I was using WAMP  to build the child - if there is a known issue with WAMP & Osclass please let me know ( i did do a search for this & found nothing well known).

So now my question is: is it easier to create your own theme (really not your own) by modification of an existing them or use a child theme (which I can't seem to get to work correctly)??

I realize you will loose out on updates to the modified theme - not an issue unless there's a security issue in the mother theme.

How about some feedback on this issue- would appreciate others opinions - Thank you