Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #902590
    shadman.skb
    Participant

    Hey Team,

    Thanks for your awesome support through out and its really a wonderful community u guys have here.

    So I was wondering if its possible to hide navbars for specific pages and show on others. Actually I installed woocommerce and the specific page where I want the navbar to appear at is.

    http://rafid.webslack.net/antiqueshop/page/2/

    Now, I tried page-id or post-id css but had no luck probably because its a woocommerce template and maby im not gettin the css selectors right. Would you guys be kind enough to help me please?

    Thanks in advance :).

    #903337
    John Ezra
    Member

    Hi there,

    Thanks for writing in! The page you have given has no navbar. You mentioned that you wanted to put a navbar there. Did you disable it for some reason, like to use a third party navigation plugin? Your nav seems to be working on other pages, would you mind providing us more detail so we can understand what you would like to achieve?

    If you are just looking for the classes, you can inspect the page using your browser dev tools and look under the body classes.

    An example of something you can use is “post-type-archive-product“.

    Let us know how that goes. Hope this helps – thanks!

    #903437
    shadman.skb
    Participant

    Oh I’m sorry for not being clear. So basically I’ve disabled my navbar globally using css as I wanted to use rev-slider on all my pages. But on the woocommerce pages, I found it hard to do so.

    So first of all I used this css to disable navbar on product pages. As as you can see rafid.webslack.com/antiqueshop has no navbar due to this. And i dont want it to have a navbar either. But on the 2nd page due to the same css change:-

    .post-type-archive-product .x-navbar {
    display:none !important;
    }

    I dont have a navbar either, so you’re right, I did disable it. Now what I want to do is basically something like this:

    1) Not show navbar on rafid.webslack.com/antiqueshop but show nav bar on the next pages (basically woocommerce product pages. Like page 1,2,3.. that u can access by clicking on the bottom of that page) that come.

    2) Additionally if you could tell me a way to have rev-slider show up on those pages instead would do the job as well.

    Thanks for replying :).

    #904146
    Zeshan
    Member

    Hi Shadman,

    Thanks for writing back!

    #1: To show the sidebar on inner shop pages, add following CSS under Custom > CSS in the Customizer:

    .post-type-archive-product.paged .x-navbar {
      display: block !important;
    }
    

    #2: Revolution Slider is not available for archive pages. You can only add it on the static pages of your site. However, it is possible to add with custom development. While that is outside the scope of support, I could point you in the right direction with the understanding that it would ultimately be your responsibility to take it from here.

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    After that, add following code in your child theme’s functions.php file:

    // Adding a Slider in Blog Page
    // =============================================================================
    
    add_action('x_before_view_ethos__landmark-header', 'welcome_message');
    
    function welcome_message() {
      if ( x_is_shop() ) {
        echo do_shortcode('[rev_slider alias="slider_alias"]');
      }
    }
    

    Replace slider_alias with your Revolution Slider alias.

    Hope this helps. 🙂

    Thank you!

    #904327
    shadman.skb
    Participant

    Awesome Sauce! It worked. Thank You so much! As for the template change, I’ll try it some other time. Really grateful for your help guys! KEEP IT UP!

    #905099
    Prasant Rai
    Moderator

    You are most welcome. 🙂

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