Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #911442
    Jeremy P
    Participant

    I have a bunch of blog posts that are part of a course, so I don’t want my sidebar on them. There’s about 60 posts in total. What’s the best way to hide the sidebar from just those posts, while leaving it on all the other blog posts?

    #911820
    Prasant Rai
    Moderator

    Hello Jeremy,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    Thanks.

    #911871
    Jeremy P
    Participant

    smartnutrition.ca

    #912165
    Darshana
    Moderator

    Hi there,

    Follow the example below and then you can add it into your Child Theme’s style.css file OR Customizer, Custom > CSS area.

    
    .single-post.postid-5904 .x-sidebar, .single-post.postid-5905 .x-sidebar {
        display: none;
    }
    
    .single-post.postid-5904 .x-main.left, .single-post.postid-5905 .x-main.left {
        width: 99.6%;
    }
    

    Post ID’s you can get as follows (https://community.theme.co/kb/how-to-locate-post-ids/).

    Hope that helps.

    #913643
    Jeremy P
    Participant

    Hi, so from what I can understand, to hide the sidebar in 60 posts, I would need to copy and paste this code 60 times into the customizer, with a different post ID each time? Can I do this for a category instead?

    #913912
    Rupok
    Member

    Hi there,

    Thanks for updating. Unfortunately this can not be controlled with category. If you don’t want to apply this globally rather for specific posts then the only way to do this with post ID of each post.

    Cheers!

    #914318
    Darshana
    Moderator

    Hi there,

    You don’t need to copy 60 times. The above example will show you how to merge posts with comma separated. You just need the Post IDs and follow the example and integrate them into the above two codes.

    Hope that’s clear.

  • <script> jQuery(function($){ $("#no-reply-911442 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>