Custom Single Side Bar not working
-
I am trying to add category sidebars to the category pages but this theme doesn’t use categories even if I add a function it ignores the categories. The sidebars function for creating category sidebars works however I can only ever select two types in your page template.
This is the function for the sidebars:function category_sidebars() { $categories = get_categories( array( 'hide_empty'=> 0 ) ); foreach ( $categories as $category ) { if ( 0 == $category->parent ) register_sidebar( array( 'name' => $category->cat_name, 'id' => $category->category_nicename . '-sidebar', 'description' => 'This is the ' . $category->cat_name . ' widgetized area', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); } }I select a page and those sidebars never show up. So what I am trying to achieve is this – category one on the page show this category one sidebar and then on the single page that category one sidebar is showing so that it is easy for the viewer to sift through category articles.
Thanks
The page I need help with: [log in to see the link]
The topic ‘Custom Single Side Bar not working’ is closed to new replies.
