WordPress.org

Ready to get started?Download WordPress

Forums

Adding right sidebar to site with existing functions.php sidebars (2 posts)

  1. wanglophile
    Member
    Posted 11 months ago #

    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.

  2. esmi
    Forum Moderator
    Posted 11 months ago #

Reply

You must log in to post.

About this Topic

Tags