Child Theme

Support Area Forums Progress Child Theme

Viewing 6 posts - 1 through 6 (of 6 total)
URL to the page in question:
  • Author
    Posts
  • #5205
    Vincent Shay
    Participant

    Wondering if you can help. I am trying to use a child theme for the Progress theme, although when I do, I get an error message:

    Warning: require_once(/home/content/61/9028461/html/wp-content/themes/progress_child/admin/options-framework.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/61/9028461/html/wp-content/themes/progress/functions.php on line 20

    Fatal error: require_once() [function.require]: Failed opening required ‘/home/content/61/9028461/html/wp-content/themes/progress_child/admin/options-framework.php’ (include_path=’.:/usr/local/php5/lib/php’) in /home/content/61/9028461/html/wp-content/themes/progress/functions.php on line 20

    The only contents I have in my child theme is a .css file. Do I need to add additional files?
    I have made plenty of child themes before without any hiccups.

    Any info would be much appreciated.

    #5206
    Bill Robbins
    Moderator

    Vincent,

    Good question about child themes. You’ll want to disable the options framework that’s part of the theme and use the plugin version of it in order to use a child theme. Here’s how to do that:

    1) Go to the appearance section and select edit to open up the theme editor or use the editor of your choice.
    2) Open up functions.php and look for this spot:

    // Load Options Framework

    /* Set the file path based on whether the Options Framework Theme is a parent theme or child theme */
    if ( !function_exists( ‘optionsframework_init’ ) ) {

    if ( STYLESHEETPATH == TEMPLATEPATH ) {
    define(‘OPTIONS_FRAMEWORK_URL’, TEMPLATEPATH . ‘/admin/’);
    define(‘OPTIONS_FRAMEWORK_DIRECTORY’, get_template_directory_uri() . ‘/admin/’);
    } else {
    define(‘OPTIONS_FRAMEWORK_URL’, STYLESHEETPATH . ‘/admin/’);
    define(‘OPTIONS_FRAMEWORK_DIRECTORY’, get_template_directory_uri() . ‘/admin/’);
    }

    require_once (OPTIONS_FRAMEWORK_URL . ‘options-framework.php’);

    }

    3) Delete that section and save your changes.
    4) Next install the Options Framework Plugin and activate it.

    That should give you access to the theme options page and let you use a child theme.

    Let me know if you run into any trouble,
    Bill Robbins

    #5214
    Vincent Shay
    Participant

    Thanks Bill, but can’t seem to get it to work. I get this error:

    Fatal error: Call to undefined function of_get_option() in /home/content/61/9028461/html/wp-content/themes/progress/functions.php on line 142

    #5215
    Bill Robbins
    Moderator

    Vincent,

    Let’s change one more section in functions.php then. Replace this:

    // include organized themes gallery
    if(of_get_option(‘gallery_include’) == ‘yes’) {
    include(TEMPLATEPATH.”/includes/ot-gallery.php”);
    }

    // include staff post type
    if(of_get_option(‘staff_include’) == ‘yes’) {
    include(TEMPLATEPATH.”/includes/post-types/staff.php”);
    }

    // include sponsors post type
    if(of_get_option(‘sponsor_include’) == ‘yes’) {
    include(TEMPLATEPATH.”/includes/post-types/sponsors.php”);
    }

    // include custom styling
    if(of_get_option(‘styling_include’) == ‘yes’) {
    include(TEMPLATEPATH.”/includes/custom-css.php”);
    }

    With this:

    include(TEMPLATEPATH.”/includes/ot-gallery.php”);
    include(TEMPLATEPATH.”/includes/post-types/staff.php”);
    include(TEMPLATEPATH.”/includes/post-types/sponsors.php”);
    include(TEMPLATEPATH.”/includes/custom-css.php”);

    and save your changes. That will remove the ability to turn on/off the lightbox gallery, staff section, sponsors section and custom styling in the theme options page. If you’d like to turn any of those items off, just leave out them out of the list above.

    See if that doesn’t help. Let me know if you run into other trouble.

    #5222
    Vincent Shay
    Participant

    It kinda works, the alterations I have made to the child themes style.css works, though it causes the site title(#text-logo h1), the navigation menu, along with the donation bar below the slideshow and several of the social networking links in the bottom right hand corner all to disappear.

    It appears it is not seeing any of the changes related to the original theme.

    This is what I have as the header for the child themes style.css

    /*
    Theme Name: Progress Child
    Description: Child theme for the progress theme
    Author: My name
    Template: progress
    */

    @import url(“../progress/style.css”);

    Followed by the css.

    Do I need to include anything else in the child theme directory?
    I usually can get away with including only the .css file.

    In the meantime, as I can’t get the child-theme to work, I have been trying to alter the actual style.css in the progress directory, I know I shouldn’t in case there are upgrades for the theme. For some reason I can’t get the @font-face property to work correctly. I have also attempted to add the css in the css box in the included editor in the theme options. No go.

    The seemingly easy task of altering the css is turning into a headache.

    You have been very helpful thus far. Thank you very much for your time.

    #5224
    Bill Robbins
    Moderator

    Vincent,

    At this point, it might be good to go back to the original functions.php file. The theme options page is set to work with some of the code from the functions.php file. One of the things it does is output any custom CSS so that could be part of what you’re experiencing there.

    Personally I tend to modify the parent theme itself vs. creating a child theme. If you’re planning on making mostly CSS changes, you could create a section at the bottom of the style.css file and place all of your changes there. That way if you need to make an update in the future you could easily move over your changes. Plus from a performance standpoint that’s actually more efficient as a bonus.

    If you do go back to the child theme route, try moving over the options.php file from the Progress theme and copy it into your child theme. It may need to be present there in order for the options to work right. Without the options functioning properly, the site title and many other features won’t work quite right.

    Let me know if I can help any further.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Child Theme’ is closed to new replies.