WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Twenty Twelve footer (39 posts)

  1. AlwaysARedhead-Catherine
    Member
    Posted 12 months ago #

    Can I put a table in the footer of the twenty twelve theme using html? Basically, instead of having image widgets in the side bar, I would like to insert the images in a table then add it to the footer.

  2. catacaustic
    Member
    Posted 12 months ago #

    Yes you can. It's pretty easy (well, compared to some other things anyway).

    Firstly, start off by creating a child theme so that your changes won't get over-written in the next theme update.

    Secondly, copy the footer.php file to your child theme and edit away! That file is probably the best starting point because it's pretty small so there's not a lot to take in.

  3. AlwaysARedhead-Catherine
    Member
    Posted 12 months ago #

    Is it necessary to create a child theme, can I not just plop the table in the footer, like so:

    <?php
    /**
     * The template for displaying the footer.
     *
     * Contains footer content and the closing of the
     * #main and #page div elements.
     *
     * @package WordPress
     * @subpackage Twenty_Twelve
     * @since Twenty Twelve 1.0
     */
    ?>
    	</div><!-- #main .wrapper -->
    	<table>
    	<tr><td>image</td>
    </tr>
    	</table>
    	<footer id="colophon" role="contentinfo">
    		<div class="site-info">
    			<?php do_action( 'twentytwelve_credits' ); ?>
    			<a>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentytwelve' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentytwelve' ), 'WordPress' ); ?></a> <strong>
    		</div><!-- .site-info -->
    	</footer><!-- #colophon -->
    </div><!-- #page -->
    
    <?php wp_footer(); ?>
    </body>
    </html>

    [Please post code & markup between backticks or use the code button. Your posted code has now been permanently damaged by the forum's parser.]

    But if not, I create a child theme (throw in all the code I have above), save it as footer_table.css,

  4. esmi
    Theme Diva & Forum Moderator
    Posted 12 months ago #

    No. Do not edit the Twenty Twelve theme. It is the default WordPress theme and having access to an unedited version of the theme is vital when dealing with a range of site issues. First create a child theme for your changes.

  5. AlwaysARedhead-Catherine
    Member
    Posted 12 months ago #

    Sorry for posting the same thing twice (I accidentally hit tab). Plus, I save the file as style.css and place it in the twentytwelve child.

  6. esmi
    Theme Diva & Forum Moderator
    Posted 12 months ago #

    No - code does not belong in a style.css file. You need to save this file as footer.php in your child theme.

  7. AlwaysARedhead-Catherine
    Member
    Posted 12 months ago #

    I saved the new footer.php file, created the twentytwelve-child directory. After I uploaded the footer.php file to the twentytwelve-child directory, I received the error "stylesheet missing". I then copied and pasted the style.css file into the twentytwelve-child directory, then received the message "template files missing".

    Should I have included "@import url("../twentytwelve/style.css"); into the footer.php file?

  8. WPyogi
    Volunteer Moderator
    Posted 12 months ago #

    Sounds like your child theme may not be set up or working correctly. Please post a link to your site.

    No, @import does not go in any file except style.css.

  9. AlwaysARedhead-Catherine
    Member
    Posted 12 months ago #

  10. WPyogi
    Volunteer Moderator
    Posted 12 months ago #

    You don't have a child theme active on that site - did you activate it after creating it? (Just like switching to any other new theme.)

  11. AlwaysARedhead-Catherine
    Member
    Posted 12 months ago #

    This is the message I receive:

    Broken Themes

    The following themes are installed but incomplete. Themes must have a stylesheet and a template.

    Name Description
    twentytwelve-child Stylesheet is missing.

  12. AlwaysARedhead-Catherine
    Member
    Posted 12 months ago #

    It will not let me activate it. I saved the footer.php in the twentytwelve-child directory, as per the info above. I did try copying and pasting the style.css into the twentytwelve-child directory but then received the message function template is missing.

    I'm unsure what other files to put in the twentytwelve-child directory.

  13. WPyogi
    Volunteer Moderator
    Posted 12 months ago #

    Start at the beginning. Remove any other files except the new style.css file - which should only have this at the top of it:

    /*
    Theme Name: Twentytwelve Child
    Description: Child theme for the twentytwelve theme
    Author: Your name here
    Template: twentytwelve
    */
    
    @import url("../twentytwelve/style.css");

    Is the file structure correct? The child theme should not be inside the parent theme. Do you see the child theme in your themes screen?

    What is the name on the child theme folder?

  14. AlwaysARedhead-Catherine
    Member
    Posted 12 months ago #

    The child theme is in the correct folder and I see it. Now, back to the original question, how do I put a plain html coded table in the footer.php?

  15. WPyogi
    Volunteer Moderator
    Posted 12 months ago #

    It's not active on your site.

  16. AlwaysARedhead-Catherine
    Member
    Posted 12 months ago #

    I have activated the child theme.

  17. WPyogi
    Volunteer Moderator
    Posted 12 months ago #

    Wow, that's odd - the site shows this as the active theme:

    href='http://alwaysaredhead.com/wp-content/themes/twentytwelve/style.css?ver=3.5.1'

    What's the name on the child theme folder?

    Do you have caching on your site or server? Maybe it's not showing changes?

  18. AlwaysARedhead-Catherine
    Member
    Posted 12 months ago #

    The new message I receive is:
    TwentyTwelve Child

    By Catherine BurdenVersion 0.1.0
    Child theme for the twentytwelve theme

    This child theme requires its parent theme, Twenty Twelve.

    This is the code in the child theme:

    /*
    Theme Name: TwentyTwelve Child
    Theme URI: http://alwaysaredhead.com
    Description: Child theme for the twentytwelve theme
    Author: Catherine Burden
    Author URI: http://alwaysaredhead.com/about/
    Template: twentytwelve
    Version: 0.1.0
    */

    @import url("../twentytwelve/style.css");

  19. WPyogi
    Volunteer Moderator
    Posted 12 months ago #

    What is the name on the child theme folder? Where is this message showing up?

    This line "This child theme requires its parent theme, Twenty Twelve" does not mean anything is necessarily wrong - that shows up for any child theme - or are you seeing it someplace other than just below the theme image (blank).

    What happens if you click "activate" for the child theme?

  20. AlwaysARedhead-Catherine
    Member
    Posted 12 months ago #

    The name of the child theme folder is twentytwelve-child. I uploaded everything using FileZilla. All the correct folders are there, in the right place.

    Next I logged into WordPress, went to themes, and activated the new child theme, this is when I received the message "this child theme requires its parent theme, Twenty Twelve".

    Now when I just click on my web site, all is fine, nothing has changed, not that it would since there is no new code in the child theme.

  21. WPyogi
    Volunteer Moderator
    Posted 12 months ago #

    Actually, when you change to a child theme, you typically would see changes - as theme settings/options don't carry over to a child theme.

    Try removing the hyphen from the child theme folder name.

  22. AlwaysARedhead-Catherine
    Member
    Posted 12 months ago #

    My original goal was to change the footer.php by adding a table with images to it. So I thought I understood, all I had to do was create a new footer.php and put it in the twentytwelve-child directory.

    Or, am I suppose to copy everything from the footer.php, paste it into the new style.css which would be put in the twentytwelve-child directory?

  23. WPyogi
    Volunteer Moderator
    Posted 12 months ago #

    Yes, I understand what you want to do. But the child theme is evidently not working or is not activated, so until that's fixed, there is no point moving forward.

    No, the footer.php code does not go in the style.css file. It is a separate file in the child theme - and should (to start with) be a copy of the parent footer.php file.

    So you should have:

    wp-content
       themes
          twentytwelve
              many files
          twentytwelvechild
              style.css
              footer.php

    I would still suggest that you change the name on the child theme folder - remove capitals and the hyphen - sometimes that seems to be a problem.

  24. AlwaysARedhead-Catherine
    Member
    Posted 12 months ago #

    The footer has shown up, but I am still receiving the message (in WordPress):

    Current Theme
    TwentyTwelve Child

    By Catherine BurdenVersion 0.1.0
    Child theme for the twentytwelve theme

    This child theme requires its parent theme, Twenty Twelve.

  25. AlwaysARedhead-Catherine
    Member
    Posted 12 months ago #

    I have lost my header for the theme.

  26. WPyogi
    Volunteer Moderator
    Posted 12 months ago #

    I would still suggest that you change the name on the child theme folder - remove capitals and the hyphen - sometimes that seems to be a problem.

  27. AlwaysARedhead-Catherine
    Member
    Posted 12 months ago #

    For some reason I have lost the image I was using in the header.

  28. WPyogi
    Volunteer Moderator
    Posted 12 months ago #

    Now it's working - YAY - and as I said, changes you have made to the parent theme are not carried over - you'll need to redo them in the child theme.

    Had you made any changes to theme files- such as style.css or any .php files?

  29. AlwaysARedhead-Catherine
    Member
    Posted 12 months ago #

    I haven't made any changes to the style.css or php files. I added the new footer.php and put it in the twentytwelvechild directory.

    Why though is WordPress still giving me the message that:

    This child theme requires its parent theme, Twenty Twelve.

  30. WPyogi
    Volunteer Moderator
    Posted 12 months ago #

    As I posted earlier -

    This line "This child theme requires its parent theme, Twenty Twelve" does not mean anything is necessarily wrong - that shows up for any child theme

    It's simply to ensure that you have the parent theme installed.

Reply »

You must log in to post.

About this Topic