Support » Fixing WordPress » How to move a sidebar widget to footer?

  • Hi,

    I’m trying to move the Meta widget from sidebar to footer. I’m using the Vortex theme. Here is the sidebar.php code:

    <div class="grid_5">
    <div id="sidebar">
    if ( ! dynamic_sidebar( 'vortex-primary-sidebar' ) ):
    $vortex_theme_data = vortex_theme_data();
    <div class="widget widget_search widget-widget_search">
    <div class="widget-wrap widget-inside">
    <?php get_search_form(); ?>
    <div class="widget widget_pages widget-widget_pages">
    <div class="widget-wrap widget-inside">
    <h3 class="widget-title"><?php _e( 'Pages', 'vortex' ); ?></h3>
    <?php wp_list_pages( 'title_li=' ); ?>
    <div class="widget widget_categories widget-widget_categories">
    <div class="widget-wrap widget-inside">
    <h3 class="widget-title"><?php _e( 'Categories', 'vortex' ); ?> </h3>
    <?php wp_list_categories('title_li='); ?>
    <div class="widget widget_archive widget-widget_archive">
    <div class="widget-wrap widget-inside">
    <h3 class="widget-title"><?php _e( 'Archives', 'vortex' ); ?></h3>
    <?php wp_get_archives( 'type=monthly' ); ?>
    <div class="widget widget_calendar widget-widget_calendar">
    <div class="widget-wrap widget-inside">
    <h3 class="widget-title"><?php _e( 'Calendar', 'vortex' ); ?></h3>
    <?php get_calendar(); ?>
    <div class="widget widget_recent_entries widget-widget_recent_entries">
    <div class="widget-wrap widget-inside">
    <h3 class="widget-title"><?php _e( 'Recent Posts', 'vortex' ); ?></h3>
    <?php wp_get_archives('type=postbypost&limit=5'); ?>
    <div class="widget widget_tag_cloud widget-widget_tag_cloud">
    <div class="widget-wrap widget-inside">
    <h3 class="widget-title"><?php _e( 'Tag Cloud', 'vortex' ); ?></h3>
    <?php wp_tag_cloud('smallest=10&largest=20&number=30&unit=px&format=flat&orderby=name'); ?>
    <div class="widget widget_text widget-widget_text">
    <div class="widget-wrap widget-inside">
    <h3 class="widget-title"><?php _e( 'About Vortex', 'vortex' ); ?></h3>
    <div class="textwidget"><?php printf( __( '%s', 'vortex' ), $vortex_theme_data['Description'] ); ?></div>
    <?php endif; ?>
    </div> <!-- end #sidebar -->
    </div> <!-- end .grid_5 -->

    I moved this piece from sidebar.php to footer.php without making any changes to it:

    <div class="widget widget_meta widget-widget_meta">
       <div class="widget-wrap widget-inside">
    	 <?php wp_register(); ?>
    <li><?php wp_loginout(); ?></li>
    <li><a>" title="<?php echo  esc_attr(__('Syndicate this site using RSS 2.0')); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
    <li><a>" title="<?php echo esc_attr(__('The latest comments to all posts in RSS')); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
    	 <?php echo apply_filters( 'widget_meta_poweredby', sprintf( '
    <li><a href="%s" title="%s">%s</a></li>
    ', 				esc_url( __( '' ) ), 				esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ),
    _x( '', 'meta widget link text' )
    			) ); ?>
    			<?php wp_meta(); ?>
          </div><!-- widget-wrap widget-inside -->
        </div><!-- widget widget_meta widget-widget_meta -->

    Yet the Meta widget still shows up at the sidebar section because it seems to be coded in Vortex’s primary sidebar. The rest of the widgets will remain in sidebar but how can I move Meta widget to footer?


Viewing 9 replies - 1 through 9 (of 9 total)
  • cant you see the meta widget from appearance >> widget. if not try commenting //wp_meta();

    Please wrap your sidebar code. Select all the code and click the “code” button above the text area. Then update.

    Ok I wrapped the code. I went to Appearance and removed the Meta widget from the sidebar so it disappeared.

    Look in Appearance > Editor.
    Do you have a footer-sidebar.php or something similar? This would be for setting widgets into the footer.

    No, there is no footer-sidebar.php.

    Nothing similar either?
    No other Widget Areas in your Appearance > Widgets besides the one sidebar?

    I actually searched around and added this to the functions.php :

    register_sidebar( array(
            'name' => __( 'First Footer Widget Area', 'twentyten' ),
            'id' => 'first-footer-widget-area',
            'description' => __( 'The first 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>',
        ) );

    to add a new widget and then went to Appearance > Widgets and saw the newly created widget area named “First Footer Widget Area”. Then I dragged “Meta” to that area but I couldn’t figure out how to make that appear in footer..Anyway actually what I did to solve it was I deleted these divs:

    <div class="widget widget_meta widget-widget_meta">
       <div class="widget-wrap widget-inside">

    The ul tags and everything between them stayed and it worked and everything functions fine. Given that I’m a novice with no PHP knowledge I’m still very puzzled about how these codes function. WordPress has a really steep learning curve!

    Did you add that to the Vortex theme?
    If so, it will disappear the next time the theme is updated.
    Need to use a Child Theme for any alterations.

    I added the register_sidebar to the main functions file not to the Vortex functions file. I already made lots of changes to the Vortex files especially the style.css without creating a child theme. :/

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to move a sidebar widget to footer?’ is closed to new replies.