Change Sidebar Order for custom divisions
-
hi there, i m working on a twentytwelve child theme.
the main problem is that i would like to add a new division between widgets, a social division, with customized social button. The problem is that i m still not able to understand how sidebar.php and sidebar-front.php work.
I’m not able to change the order of the items of the sidebar. The widget order is easy to change but i don’t understand how can i put my customized social division between a widget and another.
my codes are these ones, i thought to find a template php file with all the widget in order, so i could simply paste my division, but i don’t know where to find it (if it exists).
SIDEBAR.PHP
<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?> <div id="secondary" class="widget-area" role="complementary"> <?php dynamic_sidebar( 'sidebar-1' ); ?> <div class="socialicons"> </div> </div><!-- #secondary --> <?php endif; ?>
SIDEBAR-FRONT.PHP
if ( ! is_active_sidebar( 'sidebar-2' ) && ! is_active_sidebar( 'sidebar-3' ) ) return; // If we get this far, we have widgets. Let do this. ?> <div id="secondary" class="widget-area" role="complementary"> <?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?> <div class="first front-widgets"> <?php dynamic_sidebar( 'sidebar-2' ); ?> </div><!-- .first --> <?php endif; ?> <?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?> <div class="second front-widgets"> <?php dynamic_sidebar( 'sidebar-3' ); ?> </div><!-- .second --> <?php endif; ?> </div><!-- #secondary -->
thanks!
- The topic ‘Change Sidebar Order for custom divisions’ is closed to new replies.