How do I change the footer of my site?

I'm using the "Product" theme, but I have a feeling that the answer to this question would apply to more than just this theme - I am trying to change what it says at the footer of my site. Right now, it just has the copyright year and a "back to top" button. I'd like to add things like Contact, Affiliates, etc. down there, but I just can't figure out how to change it without going into the footer.php file and changing it manually. I'm trying to avoid doing that, since the changes would get overwritten every time an update came out for the theme.
Thanks in advance.

  • TomCollins

    I'm not certain , I'm still learning but I've just learned about child themes recenlty and I know the style.css file can allow you to change various things and still update with out effecting the main theme. Check this URLhttp://www.der-prinz.com/customizing-your-theme-with-a-child-theme/ out for a good read on the subject and I'm pretty sure it mentions the footer.php file can be put into the child theme as well or any other .php file from your main theme and will always over ride the main theme first so updates of the main theme don't effect you.

  • Elliot

    I create them myself. Actually, this is as easy as creating a new directory and copying style.css into it. You should edit the contents of style.css to give your Child Theme a new name (but you can just add the word "Child" after the theme's name).

    I don't know of a plugin for changing the footers - I imagine that's possible. But I know you could do it with a Child Theme - so there's one guaranteed option :slight_smile:

  • Patrick

    Hiya @draytond

    Here's some additional info you may find useful on your learning curve:

    Child themes are important for WordPress because themes are frequently updated to reflect the evolution of the WordPress core. If you aren’t using a child theme, all of the changes you’ve made to your theme will be overwritten each time the theme is updated.

    Since the child-theme style.css is loaded after the parent, style declarations in the child-theme style.css are further down the cascade and will take precedence over the parent as long as their specificity is equal to or higher than that found in the parent. But no need to fear creating a child theme.

    A child theme is minimally a folder in your site’s themes folder with a style.css which has the following structure:

    /* Theme Name: YOUR THEME  Child Theme Version: 1.0
        Description: A child theme for YOUR THEME.
        Author: Your name
        Author URL: http://www.yourURL.com
        Template: parent-theme-folder-name-here */
    
        @import url("../parent-theme-folder-name-here/style.css");
    
        /* add your CSS edits here */

    You will, of course, need to change your details in the above structure. Notice, there are 3 important bits of info:

    The child theme is given a name, which is what will appear in the backend when selecting a theme.
    The parent theme’s folder is named as the Template
    Info from the parent theme’s css is brought in using the @import

    Most every WPMU DEV theme comes with a child-theme bundled in the download. You'll find it in theme-name/themes. Simply upload the child-theme folder you'll find inside to your wp-content/themes directory via FTP, and activate the child-theme, not the parent (the main theme).

    For more info you can consult our WPMU DEV page on child themes or the WP Codex for child themes.

    Inspired Community Discussions

    https://premium.wpmudev.org/forums/search.php?q=child+themes
    https://premium.wpmudev.org/forums/topic/child-themes-2

    Additional Reading

    http://codex.wordpress.org/Child_Themes
    https://premium.wpmudev.org/manuals/wpmu-and-buddypress-themes-2/what-are-parent-and-child-themes/
    https://premium.wpmudev.org/projects/category/themes/
    http://www.htmldog.com/guides/cssadvanced/specificity/
    http://www.w3.org/TR/CSS21/cascade.html

  • draytond

    Thank you very much for introducing me to child themes. This changes EVERYTHING!!!!!

    I created a child theme, but I'm afraid I'm having some trouble. Loading the child theme resulted in my entire top menu disappearing, and several of the styles to change. My child theme just has two files: an image to serve as an icon for the theme, and the style.css file. Here is the contents of the style.css file:

    /* Theme Name: PRODUCT Child Theme
        Description: A child theme for PRODUCT
        Author: David Drayton
        Author URL: http://www.daviddrayton.com
        Template: product
    	Version: 1.0   */
    
        @import url("../product/style.css");
    
        /* add your CSS edits here */

    There is no code after the last comment, as I just wanted to set it up to see if it would work with no changes in place. But activating this theme kills my menu and changes some colors on the site.

    Any ideas on what's going on?

  • mansoormb

    Hmmmm.... If you remove the child theme does it go back to normal?

    With your footer menu:

    Using the child theme and adding your changes there in the footer.php is the best option but you can achieve placement of a menu using jquery as well by appending the current navigation to the footer via CSS pesudo classes.

    If you would like more I can put together an example that I have used in the past but I'm not sure if the js changes with every update?

  • draytond

    Yes, removing the child theme puts everything back to normal, which is strange because there are zero changes being made with the child theme - it's just an empty css file that imports the style information from the parent theme's style sheet.

    As for the footer, I'll see if I can get this to work first before rying to do the jquery or other methods - before this thread I had no idea child themes existed, and they seem like a method that is definitely worth getting a hang of.

  • Timothy Bowers

    I created a child theme, but I'm afraid I'm having some trouble. Loading the child theme resulted in my entire top menu disappearing, and several of the styles to change. My child theme just has two files: an image to serve as an icon for the theme, and the style.css file. Here is the contents of the style.css file:

    I posted in your other thread as well:

    https://premium.wpmudev.org/forums/topic/branding-issue-in-product-theme-image-killing-text?replies=8#post-336376

    Keep in mind that although this is a child theme, it's still independent of the settings you input in the parent. For all intents and purposes it is it's own theme, it just takes it's code from the parent unless you overwrite it.

    So if we refer to a custom menu then you'll need to create the menu again and the same for the theme settings.

    To add on this, this means any presets in the themes settings also need editing again.

    Take care.

  • draytond

    Success on all counts. Thank you all so much for you help on this - the use of child themes will drastically change the way I edit themes.

    And just so it's out there for future people to read: the reason my menu was disappearing was because when the them was changed, for some reason the "main" menu option was getting un-set. All I had to do to fix the issue was re-set that option so that my "main" menu was designated as one of the menus I had already created.

    After I got the styles and menu working, I added footer.php to the child theme and was able to edit it exactly as you said!

  • Timothy Bowers

    Hey again.

    I also posted in your other thread but for the benefit of others.

    And just so it's out there for future people to read: the reason my menu was disappearing was because when the them was changed, for some reason the "main" menu option was getting un-set. All I had to do to fix the issue was re-set that option so that my "main" menu was designated as one of the menus I had already created.

    When creating custom menus different themes have different positions for them to be located in (some themes still don't even support custom menus).

    Child themes for all intents and purposes are unique from the parent in terms of settings so naturally you could have different menu locations.

    For that reason you need to reset the menu to the new location (even though to the eye it's the same location).

    Hope that clarifies.

    Take care.