• I created a child theme which seemed to work until I noticed I could no longer choose the page layout templates from a drop-down list as in the parent theme.
    After deactivating and reactivating the child theme, I got an error child theme broken reverting to default twenty twelve.
    I uninstalling and re-installing the parent theme, reducing the child theme to the bare stlye.css with the @import url(“../mosaic/style.css”);
    Still no luck so I then renamed the child theme to child theme old and it now works and the templates are available.
    Happy, but intrigued as to what caused the issue and whether it might reappear, I began reading on non child-theme friendly themes and noticed my parent themes seems to qualify.
    It uses require once several times.
    It defines using get_stylesheet_directory instead of get_template_directory
    Several suggestions are given to alleviate the problems and I would like some confirmation on procedures I would like to do to prevent breakage.
    Should I add the following files to child directory to ensure my child theme continues working?
    1. theme-options.php file containing // Include Theme Options from parent theme directory
    <?php
    require_once ( get_template_directory() . '/theme-options.php' );
    ?>

    2. shortcodes.php // Include require once file for shortcodes file from parent theme
    <?php
    require_once( MOSAIC_PARENT_DIR . '/shortcodes.php' );
    ?>

    3. options-framework.php // Include Options Framework from parent theme directory
    <?php
    require_once( OPTIONS_FRAMEWORK_DIRECTORY . 'options-framework.php' );
    ?>

    4.functions.php /* point to parent template folder for page layouts not stylesheet folder */
    <?php
    define( 'MOSAIC_CHILD_DIR', get_template_directory() );
    ?>

    Thanks in advance!

Viewing 3 replies - 16 through 18 (of 18 total)
  • Thread Starter razoredger

    (@razoredger)

    Ah, ok. Will take a look.

    Thread Starter razoredger

    (@razoredger)

    I have checked where the page templates appear. Some are referred to in functions.php and in loop-page.php. Some are not referenced by their name anywhere according to results from a “find in path” search of the mosaic theme folder using PhpStorm IDE.

    For now I will let it go, since I have it working using a re-baptized clone of my original child-theme together with copies of page templates.

    Thanks s alot for your suggetions and time!

    No probs. I’d guess that the theme’s developer would be the best person to answer some of the questions raised by this topic but, generally speaking, custom page templates aren’t referenced within a theme other than by application of the custom files themselves. WordPress handles them by default.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Child Theme issues’ is closed to new replies.