Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1168646
    Noellemena
    Participant

    Hello!
    Ok, so I hope this is simpler than I seem to be able to find.
    Using Icon on my client’s site.
    She only wants the sidebar to show on the Shop page. I have the “shop” sidebar set up and showing on the shop page, but need to know how to hide it everywhere else. Fun. 🙂

    So, Please say yes Noelle, it is so simple! 🙂

    *Second Quickie Question…
    I have X on over 14 sites, but I have never “switched stacks” on a site after creating under a specific stack. Can you please tell me…
    IF I were to say all of sudden switch the stack on this site from Icon to like Renew, JUST to see what it looks like, COULD I do that and NOT lose anything when choosing to switch BACK to Icon?? Or would settings get lost in transition??

    Thank you soooo much as always!
    Login below!
    Noelle

    #1168647
    Noellemena
    Participant
    This reply has been marked as private.
    #1169015
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! To resolve your site and make sure that only the shop page has the sidebars, please insert the following code in your child theme’s functions.php file

    // Sidebars only in Shop page
    // =============================================================================
    function no_sidebars_allowed($contents) {
      if ( ! x_is_shop() ) {
        $contents = 'fullwidth';
      }
      
      return $contents;
    }
    add_filter('x_option_x_layout_content', 'no_sidebars_allowed');
    // =============================================================================

    Please let us know if this works out for you.

    #1172085
    Noellemena
    Participant

    Hello! I added the above and all it did was move the sidebar to the left and overlaps content. Such as here:
    http://myjourneyoffaith.com/jamie-smith/
    *Must be logged in to view.

    Screen shot added as well.
    It is like this on any page that would show posts etc. And now it shows on even more pages that it never even showed before.

    This code is not working, could you login and see? Thank you! I am leaving this code in place while you assess. 🙂

    Also, you did not address my other question above, here that is again as well. Thank you for your help!

    *Second Quickie Question…
    I have X on over 14 sites, but I have never “switched stacks” on a site after creating under a specific stack. Can you please tell me…
    IF I were to say all of sudden switch the stack on this site from Icon to like Renew, JUST to see what it looks like, COULD I do that and NOT lose anything when choosing to switch BACK to Icon?? Or would settings get lost in transition??

    #1172550
    Christopher
    Moderator

    Hi there,

    Please add this code in customizer :

    @media (min-width:979px){
    body.single.single-post .x-main, .single-post header.masthead.masthead-stacked, .single-post .x-colophon {
        padding-left: 250px;
    }
    }

    Yes, you can switch between stacks without loosing customization.

    Hope it helps.

    #1173806
    Noellemena
    Participant
    This reply has been marked as private.
    #1174336
    Christopher
    Moderator

    Hi there,

    There is syntax mistake in your CSS. Please find this code in your customizer and remove extra curly bracket :

    .x-navbar .x-container.max.width {
        max-width: 100%;
        width: 100%;
    }
        display: block;
        width: 100%;
    }

    Then add provided code in previous replay :

    @media (min-width:1200px){
    body.single.single-post .x-main, .single-post header.masthead.masthead-stacked, .single-post .x-colophon {
        padding-left: 250px;
    }
    }

    Note that the code is the same, I just changed min-width value.

    Hope it helps.

    #1175318
    Noellemena
    Participant

    Hey this is still not working 🙁 I changed the min-width value in each direction and it goes away for a flash then re-appears. Did you login and it actually worked??

    *I even put the site back on no sidebar as a whole just to see and now with that code in there and in the functions file the site is showing the sidebar on the left even when set to full width.
    *Note that I have put it back to content left, sidebar right though now so we can get this remedied.

    The other code with the extra bracket I got from the forum here and added as it was given 🙁 I am assuming it was the} in the middle of the code, and I took it out.

    Please help as I can not make other changes while the sidebar is hogging the space … THANK YOU!

    #1175902
    Rue Nel
    Moderator

    Hello There,

    Thanks for updating in! I have resolve the issue for you. Back from your original post, you wanted to remove all the sidebars and only show it in the shop page. I ended up modifying the custom code and used this:

    // Sidebars only in Shop page
    // =============================================================================
    function no_sidebars_allowed($contents) {
      if ( ! x_is_shop() ) {
        $contents = 'full-width';
      }
      
      return $contents;
    }
    add_filter('x_option_x_layout_content', 'no_sidebars_allowed', 5);
    // =============================================================================

    I did remove the custom css given and now, you can only find the sidebar just in your shop page already.

    If you need anything else we can help you with, don’t hesitate to open another thread.

    #1177258
    Noellemena
    Participant

    THANK YOU THANK YOU!
    This WORKED! 🙂 I am so happy!
    To be in full understanding if I wanted to do this again on another site.

    I would ONLY put the code you posted into php file and then add nothing to the customizer, correct???

    Thank You!!

    Noelle

    #1177677
    Rad
    Moderator

    Hi there,

    Yes, correct 🙂

    You’re most welcome!

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