WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Eleven footer alterations: functions or footer css? (14 posts)

  1. EnmnM
    Member
    Posted 1 year ago #

    I want to make changes to my footer in my 2011 child theme. Am I better off re-writing the whole thing in the footer.php file or the functions.php file where it deals with the footer widgets?

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    make changes to my footer in my 2011 child theme

    what changes?

    the details obviously depend on the type of the changes; and if you need the widgets for other purposes...

  3. EnmnM
    Member
    Posted 1 year ago #

    I guess I don't understand when to make changes to the hook or to the general functions file.

    I want to restyle the footer area (colors, background, etc.), add the 3 widgets I am allotted to include a contact form, tag cloud, and something else. If I had a widget column, I know how to do that. Also, a copyright...I may need another div in there also.

  4. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    restyle the footer area (colors, background, etc.)

    this is done with css in style.css of your child theme - for general formatting help, consider to ask at a css forum like http://csscreator.com/forum

    add the 3 widgets I am allotted to include a contact form, tag cloud, and something else.

    use the existing 'Footer Area One' etc widget areas under dashboard - appearance -widgets.

    If I had a widget column, I know how to do that.

    I don't understand that comment (?)

    Also, a copyright

    could be done by adding some code like this to functions.php of the child theme:

    //copyright for footer
    add_action( 'twentyeleven_credits', 'my_copyright_note' );
    function my_copyright_note() {
    echo  '<span class="copyright-note">© '. date('Y') . ' by WhoEver</span>';
    }

    plus corresponding formatting in style.css.

    in total so far no need to edit footer.php

  5. EnmnM
    Member
    Posted 1 year ago #

    My thoughts are going faster than my typing. I meant to say, if I needed an additional column in the footer, I know how to do that. I also know (sort of) how to modify my style.css.

    I guess I just wasn't sure what the footer.php is for, other than for the closing html tags.

  6. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    if I needed an additional column in the footer, I know how to do that.

    great - just in case somebody else needs it:

    additional widget column in Twenty Eleven child theme footer:

    (I had the code already in my test blogs)

    in functions.php of the child theme:

    //add a fourth footer widget area//
    
    add_action( 'widgets_init', 'register_fourth_footer_widgets', 20 );
    
    function register_fourth_footer_widgets() {
    
    	register_sidebar( array(
    		'name' => __( 'Footer Area Four', 'twentyeleven' ),
    		'id' => 'sidebar-6',
    		'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ),
    		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    		'after_widget' => "</aside>",
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>',
    	) );
    }

    some extra sections in sidebar-footer.php:
    the new full file:
    http://pastebin.com/aGsS7UrT

    addition to style.css of the child theme:

    /* Four Footer Widget Areas */
    #supplementary.four .widget-area {
    	float: left;
    	margin-right: 3.7%;
    	width: 22.18%;
    }
    #supplementary.four .widget-area + .widget-area + .widget-area + .widget-area {
    	margin-right: 0;
    }

    PS EDIT (nov 2012):
    this was missing in the original posting:

    addendum to functions.php of the child theme to create the necessary css classes (see the different function name):
    http://pastebin.com/Ugr4p5Ja

  7. EnmnM
    Member
    Posted 1 year ago #

    That looks like what I mocked up!

    If I do this should I still use the drag-and-drop widgets in the dashboard for the first 3, and hardcode the fourth? Or hardcode all four?

  8. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    or use widgets for all four?

    do whatever works best for you ...

  9. cgrray
    Member
    Posted 1 year ago #

    I'm using a child theme of twentyeleven. I used the code in alchymyth's post above and the sidebar-footer.php code from pastebin. The fourth footer are shows up in my dashboard and I can add content to it but the new style isn't being picked up. The widget areas are still using the width from #supplementary.three .widget-area so the fourth area wraps. If I change the width in #supplementary.three .widget-area in twentyeleven style.css to 22.18% the four widget areas are displayed across in one line correctly.
    I tried adding the style for the fourth widget area to the twentyeleven style.php but that style isn't recognized; the width is still 30.85% as is used in the three widget areas.
    Any help will be much appreciated.

  10. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    cgrray, if you need help, start your own thread per the forums guidelines and include a link to your site.

  11. cgrray
    Member
    Posted 1 year ago #

    OK I did that. I posted here because I thought my question relevant to this post.

  12. karen11
    Member
    Posted 1 year ago #

    Hi

    Is it possible to add the fourth widget area that is full width? Meaning it's sitting just above the existing 3 column widget at footer? Thanks.

  13. Andrew Nevins
    Spam zapper & Volunteer Moderator
    Posted 1 year ago #

    Karen11, why try to attempt to revive a 5-month-old conversation? Create your own thread.

  14. karen11
    Member
    Posted 1 year ago #

    Alright .. Sorry..

Topic Closed

This topic has been closed to new replies.

About this Topic