• Resolved ab

    (@maml)


    Hi people. I’m having a issue with the demo store notice showing up on my site. It seems to show on category and product pages but not other pages such as the homepage or about page. Can anybody help with how to get it to show site wide? Thanks

    • This topic was modified 1 year, 2 months ago by ab.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi there,

    If the store notice is still showing on your site, you want to:

    • Head over to Appearacnce → Customize
    • Once there, go to WooCommerce → Store Notice
    • Uncheck the Enable store notice checkbox
    • Click the Publish button

    That should get you sorted.

    If you’ve done that and the notice is still there, I’d recommend looking at any caching you might have on the site as?@maml?suggested. It might also be worth speaking to your hosting company about as they may be implementing caching on the server side even if you don’t specifically have any caching plugins installed.

    Thread Starter ab

    (@maml)

    hi thank you for your reply. I think you misunderstood the problem. The store notice shows on all woo commerce generated pages such as product pages, and categories.

    the problem is it doesn’t show on other pages such as the homepage. I think this could be solved my adding something to the page template? Or adding something to the functions file to force the notice to show site wide? I don’t know what exactly though.

    Hey @maml,

    Thanks for clarifying!

    Checking your site, I see what you mean, as the store notice is being displayed on the product and category pages but not on the Homepage.

    This is not something I am able to replicate on my test site as the store notice is being displayed on all pages, including the Homepage.

    It’s possible that this may be a theme-related issue, can you try temporarily switching to a default theme, such as Storefront and see if this resolves the issue?

    If you do not want to test on your live site, you can use the free?Health Check?plugin which will allow you to switch themes while you’re still logged in, without affecting normal visitors to your site.

    If the issue is still present when switching to the Storefront theme, can you please share a copy of your sites System Status Report so that we can take a closer look at your sites current environment.

    You can find this via WooCommerce → Status. Select Get system report and then Download for Support. This will download a TXT file that has the contents of the SSR which you can then share with us here.

    Cheers!

    Thread Starter ab

    (@maml)

    Thank you for the response, I tried with the storefront theme and the notice shows on all pages at the bottom of the page. So it must be a theme issue

    Thread Starter ab

    (@maml)

    Issue fixed, it was something in the themes function file stopping the notice displaying

    Hi @maml

    That’s great, I am glad you managed to resolve the issue after the clarification. ??

    I will mark this thread as solved for now.

    @maml I have the same issue but in another theme, can you tell me what function/hook did you find in order to make it show everywhere?

    Thread Starter ab

    (@maml)

    @rwky My issue was caused because in the past I had disabled a bunch of woocommerce scripts. After several updates I started getting issues and had to get rid of the code disabling the scripts. If you have disabled any woocommerce scripts I suggest you re enable them one by one to see if this fixs the issue. I’ve pasted the old code I had, I can’t remember exactly which one was causing the issue with the store notice but I ended removing all of them as I was getting other issues too. Hope this helps

    /** Disable All WooCommerce Styles and Scripts Except Shop Pages*/
    add_action( 'wp_enqueue_scripts', 'dequeue_woocommerce_styles_scripts', 99 );
    function dequeue_woocommerce_styles_scripts() {
    if ( function_exists( 'is_woocommerce' ) ) {
    if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) { Styles
    
    wp_dequeue_style( 'woocommerce-general' );
    wp_dequeue_style( 'woocommerce-layout' );
    wp_dequeue_style( 'woocommerce-smallscreen' );
    wp_dequeue_style( 'woocommerce_frontend_styles' );
    wp_dequeue_style( 'woocommerce_fancybox_styles' );
    wp_dequeue_style( 'woocommerce_chosen_styles' );
    wp_dequeue_style( 'woocommerce_prettyPhoto_css' ); Scripts
    
    //wp_dequeue_script( 'wc_price_slider' );
    wp_dequeue_script( 'wc-single-product' );
    wp_dequeue_script( 'wc-add-to-cart' );
    wp_dequeue_script( 'wc-cart-fragments' );
    wp_dequeue_script( 'wc-checkout' );
    wp_dequeue_script( 'wc-add-to-cart-variation' );
    wp_dequeue_script( 'wc-single-product' );
    wp_dequeue_script( 'wc-cart' );
    wp_dequeue_script( 'wc-chosen' );
    //wp_dequeue_script( 'woocommerce' ); - causes store notice to stop working on manual pages
    wp_dequeue_script( 'prettyPhoto' );
    wp_dequeue_script( 'prettyPhoto-init' );
    wp_dequeue_script( 'jquery-blockui' );
    wp_dequeue_script( 'jquery-placeholder' );
    wp_dequeue_script( 'fancybox' );
    wp_dequeue_script( 'jqueryui' );
    }
    }
    }

    Yes, that is also my case, I have temporary disabled them since I need the store notice to be store-wide; hopefully in the future this function will get it’s own assets allowing users to optimise how they see fit.

    Hey, @rwky!

    As I understand you were able to solve the issue with @maml’s solution, correct?

    Regarding having customization options for the store notice, we appreciate your suggestions and are always looking for ways to improve our products and services, and input from users like you is invaluable.

    We have a website where you can submit feature requests and upvote the ones other people submitted and you like. You can check that out here.

    Please let us know if there’s anything else we can do to help or if you have further questions.

    Have a wonderful day!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘woocommerce store notice not on pages, only shows on catergories and products’ is closed to new replies.