WordPress.org

Support

Support » Themes and Templates » How do I get multiple footers?

How do I get multiple footers?

  • How do I get multiple footers?

    I thought this would be straight forward
    I’ve searched for this and the solutions seems simple enough
    But they seem to be ‘hacks’ and require editing theme files

    Is there any other way to do? More easier?

    IMPORTANT: I want to be able to drag different widgets into the new footers I create – I thought I’d mention this incase it wasn’t an obvious thing

    Thanks

    Omar

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey Omar,

    The only way you can get that is by modding some of your themes files. Uou will need to modify the following theme files to get multiple footers:
    functions.php and footer.php

    If you’ve got the Twenty Ten theme on your site still then open up functions.php and go to line number 343 in the code and you should see:

    ‘Register widgetized areas, including two sidebars and four widget-ready columns in the footer.’ the function twentyten_widgets_init() registers the widgets to show up in your dashboard. You’ll need to put some of this code into your themes functions.php file.

    Maybe try this:

    function OM2_widgets_init() {
    	register_sidebar( array(
    		'name' => __( 'Footer Widget Area', 'twentyten' ),
    		'id' => 'footer-widget-area',
    		'description' => __( 'The footer widget area', 'twentyten' ),
    		'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    		'after_widget' => '</li>',
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>',
    	) );
    }
    add_action( 'widgets_init', 'OM2_widgets_init' );

    Next up you need to register the sidebar which is done in footer.php.

    Add in something like:

    <?php if ( is_active_sidebar( 'footer-widget-area' ) ) : ?>
    				<div id="footer-widget" class="widget-area">
    					<ul class="xoxo">
    						<?php dynamic_sidebar( 'footer-widget-area' ); ?>
    					</ul>
    				</div>
    <?php endif; ?>

    I haven’t tested that code so let me know if it doesn’t work and I’ll fire up my code editor and check it works.

    http://codex.wordpress.org/Function_Reference/register_sidebar has more details about the register_sidebar function too 🙂

    bronson

    that’s awesome – thank u
    i will give ur suggestions a go and will report back if i have any problems

    but… having said that: i would have thought that it wouldn’t be impossible to have one footer and separately have an interface where u can drag and remove new footers as u please

    this is the solution i was looking for – i assumed that someone would have had a nice plugin written?

    omar

    Ahh okay then. You might want to check out the Carrington theme. There is a video of it here: http://www.themelab.com/2010/08/09/carrington-build-introduction/ or maybe http://ithemes.com/purchase/builder-theme/.

    That might be more suited for you then.

    Oh yeah and I forgot about Headway themes as well:
    http://headwaythemes.com/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How do I get multiple footers?’ is closed to new replies.
Skip to toolbar