Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1352046

    Hello again,

    I have a display issue with the Store Notice (Customizing ->WooCommerce->Store Notice) located at the top of the website in both version (desktop and Mobile version). Clearly, the notice is hiding the header instead of being displayed on top of it. Is there a way to solve this please?

    Thanks for your help

    #1352062

    Hey rubenhazan2020,

    Are you referring to the bar at the top of your site with the following text?

    Livraison gratuite pour toute commande superieure a 100 euros Dismiss

    If so, then where would you like to place it?

    Best regards,
    Rikard

    #1352090
    This reply has been marked as private.
    #1352105

    Hi,

    That element is a notification which can be dismissed. We can give you CSS to move the header down below it, but then there would be space left when it’s dismissed/removed.

    Best regards,
    Rikard

    #1352439
    This reply has been marked as private.
    #1352489

    Hi,

    Please try to add this to Quick CSS:

    #wrap_all {
        margin-top: 41px;
    }
    
    p.demo_store {
        top: -10px;
    }

    Then add this function to remove the top margin after the notice has been clicked:

    function ava_remove_top_margin(){
        ?>
    	<script>
    	jQuery(document).ready(function(){
    	  jQuery("a.woocommerce-store-notice__dismiss-link").click(function(){
    	   jQuery("#wrap_all").css('margin-top', '0');
    	  });
    	});
    	</script>
        <?php
    }
    add_action('wp_footer', 'ava_remove_top_margin', 999);

    Best regards,
    Rikard

    #1352630
    This reply has been marked as private.
    #1352639

    Hi,

    I added the function to your functions.php file, and it’s working as it should. Please note that the function will be overwritten on updates, unless you put it in a child theme.

    Best regards,
    Rikard

    #1352937
    This reply has been marked as private.
    #1353026

    Hi,

    Thanks for the update. I’ve been trying to find a solution for that, but I haven’t been able to unfortunately.

    Best regards,
    Rikard

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.