Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1409365
    Itwebdevelopment
    Participant

    Hi, I’d like to make it so that I have a sidebar only on my internal blog pages.

    I’ve setup the site so that the sidebar only shows on the blog but it still shows a blank sidebar on all my other pages.

    I only want it on the blog.

    Is there any way to do this?

    Thanks!!

    Here’s a link to the side:

    https://www.dzdrones.com/drones/3-reasons-night-flying-tough/

    #1409428
    Lely
    Moderator

    Hi There,

    I don’t see a blank sidebar on this post page:https://www.dzdrones.com/drones/3-reasons-night-flying-tough/
    I am little confuse on your statement above.
    Just to clarify, you want blog index page and other page type to be fullwidth with no sidebar, correct?
    Then show sidebar on blog single post page and archive pages, correct?
    Please clarify.

    #1410289
    Itwebdevelopment
    Participant
    This reply has been marked as private.
    #1410737
    Itwebdevelopment
    Participant

    I’ve gone ahead and enabled it site wide though it will probably annoy visitors.

    I just want it to show on the blog.

    I’d also like it if it’s possible for it to appear under the main header or this:

    https://gyazo.com/067cde510a07a559dc6d82578fea6eb9

    Please help.

    Thanks!

    #1410762
    Itwebdevelopment
    Participant

    I’d also like it to remain about the footer widgets and things too if that’s possible

    #1410848
    Lely
    Moderator

    Hi There,

    To hide the sidebar on all pages except blog post page, please add this custom CSS on Appearance > Customize > Custom > Edit Global CSS:

    @media (min-width: 1200px){
    .x-sidebar {
        display: none;
    }
    body.blog.x-content-sidebar-active,
    body.x-content-sidebar-active.archive,
    body.x-content-sidebar-active.category {
        padding-right: 0;
    }
    body.x-content-sidebar-active .x-navbar-fixed-top{
       right:0;
    }
    }

    Footer will still remain. It will not be affected by that CSS.

    Hope this helps.

    #1411537
    Itwebdevelopment
    Participant

    HI, my sidebar content is now not showing on desktop view and is showing on mobile.

    I don’t want the sidebar to show on mobile.

    And I want the content to show on desktop view.

    Can you help?

    #1411606
    Itwebdevelopment
    Participant

    It’s also showing the sidebar on my cart page and other pages. What do I do?

    And can you make it so the sidebar doesn’t go into the footer widgets and remains above like the header

    #1411941
    Christopher
    Moderator

    Hi there,

    Please add following code in Customize -> Custom -> Global CSS :

    
    @media (max-width:979px){
    x.sidebar{
    display:none;
    }
    .x-main{
    width:100%;
    }
    }

    Make shop page full width under Customize -> Woocommerce.

    And can you make it so the sidebar doesn’t go into the footer widgets and remains above like the header

    Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.

    Hope that helps.

    #1412298
    Itwebdevelopment
    Participant

    Hi, it’s still showing my sidebar on my checkout page and a few other pages. Could you please help

    #1412299
    Itwebdevelopment
    Participant

    It’s also not showing anything in the sidebar. Please take a look. Thank you

    #1412910
    Rad
    Moderator

    Hi there,

    It seems to be working, would you mind providing the URLS and screenshot?

    Thanks!

    #1412915
    Itwebdevelopment
    Participant

    The sidebar’s content is only showing on mobile. The actual sidebar is showing on my cart page:

    https://www.dzdrones.com/cart/

    Checkout page and other pages.

    I do not want this.

    I want my sidebar to show only on desktop.

    Only on desktop.

    And I would like it to only show on my internal blog pages.

    The sidebar shows on mobile. and on mobile also show on the blog page before the internal pages. I do not want this.

    — – — —

    I want the sidebar to show only on the internal blog pages and only on desktop and I want the content in the sidebar to show up there.

    Please help me to resolve this.

    I have given you login to take a look at the sidebar, widgets and custom code from the developers on this website.

    Please help.

    Thank you

    #1413308
    Rue Nel
    Moderator

    Hello There,

    Thanks for updating in! To resolve your issue, you must do the following:
    #1] You must set the global layout to be just “Fullwidth”. You can change this setting in Appearance > Customize > Layout & Design and set the “Content Layout” as Fullwidth.

    #2] We then need a code to add a sidebar only in your single blog posts. To do that, since you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.

    // Add sidebars only in single posts
    // =============================================================================
    function single_post_sidebars($contents) {
      if ( is_single() ) {
        $contents = 'content-sidebar';
      }
      
      return $contents;
    }
    add_filter('x_option_x_layout_content', 'single_post_sidebars');
    // =============================================================================

    #3] And lastly, to make sure that the sidebar will only be visible in desktops and not on mobile, please add the following css code in the customizer, Appearance > Customize > Custom > Edit Global CSS

    @media (max-width: 979px){
      .x-sidebar {
        display: none !important;
      }
    }

    We would loved to know if this has work for you. Thank you.

    #1413334
    Itwebdevelopment
    Participant

    This did not work when I tried.

    And even if it did the sidebar is still not showing on desktop.

    It has been 4 days.

    Can you please fix this for me.

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