This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Taxonomy-only sidebar

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #16780
    Jason Bobich
    Keymaster

    Hello,

    Sounds like what you’re doing should work. You want to send over WP login details and I can check it out? You can send the info at My Account > Submit private info here on the support site. Make sure to post back here after the info is sent.

    #16785
    peak1media
    Participant

    Hey, I think I tracked it down. I had to modify your themeblvd_fixed_sidebars() function so my taxonomy archives page would show sidebars. Is there any easier way to do that?

    function themeblvd_fixed_sidebars( $position ) {
    
    	$layout = themeblvd_config( 'sidebar_layout' );
    
    	// Sidebar Left, Sidebar Right, Double Sidebars
    	if ( $layout == 'sidebar_'.$position || $layout == 'double_sidebar' || get_post_type()=='juice' || is_tax('juice_category')) {
    ...
    ...
    ...
    #16793
    Jason Bobich
    Keymaster

    Your customization doesn’t quite make sense. If this is what you’re having to do, I think you may be misunderstanding something somewhere else.

    These sidebars in this function are displayed based on the current sidebar layout. A sidebar layout is something that is set for every page of your site, no matter what it is — page, post, taxonomy archive, whatever. So the logic of what you’ve changed the condition to doesn’t make sense.

    What do you have set for the global Sidebar Layout option at Appearance > Theme Options > Layout > Main?

    #16794
    peak1media
    Participant

    The “Default Sidebar Layout” is full width, so I’m using the themeblvd_fixed_sidebars() function to override that for is_tax(‘juice_category’).

    #16799
    Jason Bobich
    Keymaster

    Aw, well that explains it all then. If you’ve applied your custom sidebar to the sidebar right location, you need to have the location set to show in the first place. So, what you want to do is apply the correct sidebar layout to your taxonomy page and custom post type.

    From your child theme’s functions.php, or your own plugin, you’d just filter themeblvd_sidebar_layout.

    http://dev.themeblvd.com/tutorial/sidebar-layouts/#custom

    function my_sidebar_layout( $sidebar_layout ) {
     
        if( get_post_type() == 'juice' || is_tax('juice_category') ) {
            $sidebar_layout = 'sidebar_right';
        } 
        return $sidebar_layout;
     
    }
    add_filter( 'themeblvd_sidebar_layout', 'my_sidebar_layout' );
    #16802
    peak1media
    Participant

    Yes, I knew there was a better way. It works, thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.