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.

Problems using custom layouts in blog and blog posts

  • Creator
    Topic
  • #2836

    Hi,
    The default layout in my theme is full witdh layout.
    I set the blog page and “all posts” to have a custom layout (right sidebar layout).
    The blog page (showing the first 5 pages is working properly) but the individual posts (even if I chose “All posts”) is not responding, ans showing the template’s default layout, that is, the full witdh layout.
    I get the same result when I navigate using the breadcrumbs, listing all the files under one category, but without the right sidebar.
    What might I be doing wrong?
    I know I can get the expected result by modifying in each post its template, one by one, but there should be a way to get it working for all the post authomatically.
    Thanks for your reply
    Pablo

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

    Hello,

    Your choices in terms of the sidebar layout are only to select a site-wide layout and one for individual pages/posts.

    I set the blog page and “all posts” to have a custom layout (right sidebar layout).
    The blog page (showing the first 5 pages is working properly) but the individual posts (even if I chose “All posts”) is not responding, ans showing the template’s default layout, that is, the full witdh layout.

    There is no option anywhere that allows you to select a sidebar layout for all posts. So I think where ever you’re reading this “all posts” you’re quoting, you’re misunderstanding the context.

    Individual post pages have nothing to do with your actual blog page where you’re looping through and showing them in whatever format. As you eluded to, the only way for your individual posts have a different sidebar layout than the site-wide option would be to set them up that way individually for each post.

    I get the same result when I navigate using the breadcrumbs, listing all the files under one category, but without the right sidebar.

    The only way to effect the sidebar layout of WordPress archive pages would be from the site-wide option, as obviously there’s no direct page you could edit the sidebar layout of.

    I know I can get the expected result by modifying in each post its template, one by one, but there should be a way to get it working for all the post authomatically.

    The only way to do this would be through customization from your Child theme’s functions.php. You’d have to filter the sidebar layout yourself depending on whatever WordPress conditional tag.

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

    http://codex.wordpress.org/Conditional_Tags

    function my_sidebar_layout( $sidebar_layout ) {
     
        if( is_single() || is_archive() ) 
            $sidebar_layout = 'sidebar_right';
     
        return $sidebar_layout;
     
    }
    add_filter( 'themeblvd_sidebar_layout', 'my_sidebar_layout' );
    #2911

    It works exactly as I intended when I did it as you mentioned and suggested!
    It was great help, as usual, thank you so much.
    It is sooo good to have such a great support from you.
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.