Custom theme files not working.

I copied the footer.php to my child theme and made some edits. The changes are not available. I also edited style.css and it is not available.

The documentation (and my previous experience) suggests that you just need to copy a file to the child theme and edit it in order to replace it.

Any idea what I have broken?

Forget it, the changes seem to be working. Next time I'll take a deeper breath before I ask a question :slight_smile:.

  • trevogre

    I guess I still have a question, I replaced the theme-options.php file.

    But the source of the page still read:

    <link rel="stylesheet" target="_blank" href="" type="text/css" media="all" />

    As you can see it wasn't pulling from the child theme. So I went in the header and found:

    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/theme-options.php" type="text/css" media="all" /></dode>

    I tried setting it to:

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory');?>/theme-options.php" type="text/css" media="all" />

    To get it to use the altered file, it points to the right location but it doesn't work.

    So I thought that maybe the code for the member theme to locate functions.php need to be enabled.

    That gave me:

    PHP Warning: require_once(/mnt/stor1-wc1-dfw1/384134/ Social Child/bp-social-child/functions.php) [function.require-once]: failed to open stream: No such file or directory in /mnt/stor1-wc1-dfw1/384134/ on line 13

    That code is as follows:

    define( 'ABSPATH', dirname(__FILE__) . '/' );
    $current_theme = get_current_theme();
    $site_directory = ABSPATH . '/';
    require_once($site_directory . 'wp-content/themes/' . $current_theme . '/functions.php');

    It appears that $current_theme is out putting "BuddyPress Social Child/bp-social-child" in the path, thats seems like a bug to me.

    Solved it! The child theme requires that the functions-sample.php becomes functions, so you have to use the custom functions template for your child theme instead of copying the functions from the parent, before you can enable the theme-options.php customizations.

    That still doesn't explain to me how the search and replace works? Why did I have to explicitly point bloginfo('stylesheet_directory'); ?

    Or did I not, I'm going to go back and revert that to <?php bloginfo('template_directory');

    And see if it uses the customizations.
    ...It did not.

    So the steps towards customization the buddypress social theme so that you can modify the theme_options style output for you site are:

    1. copy the theme_options file to your child theme.
    2. copy the header.php file to your child theme and edit it to point to:
    instead of:
    3. Make sure that you rename functions-sample.php to functions.php.

    Then it should fire your customizations.

    I guess that this is a little outside the box and it might warrant a new parent theme. All I'm trying to do is leverage the header colors in the footer to make a more colorful footer that you can use the sample colors to customize.

    I suppose the other option would have be the customize my header file to point to a different php file to generate additional style customizations based up the theme variables.

    Either way I'm replacing files that will need their customizations up dated if the base theme has a new version.

    I'm not sure what the best approach is here. Is there any idea, which elements of this theme are more static than others? What is the position on upgrading the theme? Do you set down the classes and the basic elements of the them and say that is that for this theme so that all child theme styling is respected? Or do you have a looser attitude about upgrades and what they are going to break?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.