Support » Themes and Templates » Adding right sidebar to site with existing functions.php sidebars

  • Hi,

    I’m currently running Ryu by Automattic on my blog, http://www.wanglophile.com

    I’d like to add a right sidebar to posts, primarily so I can use the Side Matter plugin. http://wanglophile.com/side-matter-test/ shows how the lack of a sidebar means the Side Mattercitations don’t appear.

    I have tried adding a sidebar myself (in conjunction with various sidebar plugins), but have only been able to create one on the top or bottom of the post, not the side.

    The current functions.php file has this in relation to sidebars:

    function ryu_widgets_init() {
    	register_sidebar( array(
    		'name'          => __( 'Top Widget Area One', 'ryu' ),
    		'id'            => 'sidebar-1',
    		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</aside>',
    		'before_title'  => '<h1 class="widget-title">',
    		'after_title'   => '</h1>',
    	) );
    
    	register_sidebar( array(
    		'name'          => __( 'Top Widget Area Two', 'ryu' ),
    		'id'            => 'sidebar-2',
    		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</aside>',
    		'before_title'  => '<h1 class="widget-title">',
    		'after_title'   => '</h1>',
    	) );
    
    	register_sidebar( array(
    		'name'          => __( 'Top Widget Area Three', 'ryu' ),
    		'id'            => 'sidebar-3',
    		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</aside>',
    		'before_title'  => '<h1 class="widget-title">',
    		'after_title'   => '</h1>',
    	) );
    
    	register_sidebar( array(
    		'name'          => __( 'Top Widget Area Four', 'ryu' ),
    		'id'            => 'sidebar-4',
    		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</aside>',
    		'before_title'  => '<h1 class="widget-title">',
    		'after_title'   => '</h1>',
    	) );
    }
    add_action( 'widgets_init', 'ryu_widgets_init' );

    I would be very grateful for any help.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Adding right sidebar to site with existing functions.php sidebars’ is closed to new replies.