Support » Theme: Storefront » change position of storefront_shop_messages in Storefront

  • Hi

    I can’t unhook storefront_shop_messages to hook it to another position.
    I tried this in functions.php (Storefront child theme), but it doesn’t work:

    remove_action( 'storefront_content_top',             'storefront_shop_messages',                 15 );
    add_action('woocommerce_product_meta_end', 'storefront_shop_messages',                 1 );

    Any help?


Viewing 2 replies - 1 through 2 (of 2 total)
  • Asif


    Hi @louisjj

    wrap it around a function.

    add_action( 'init', 'reposition_sf_messages' );
    function reposition_sf_messages(){
         remove_action( 'storefront_content_top','storefront_shop_messages',15 );
         add_action('woocommerce_product_meta_end', 'storefront_shop_messages',1 );


    • This reply was modified 3 years, 9 months ago by Asif.
    Thread Starter louisJJ


    Thanks Asif, but it doesn’t work. The messages are still at the top

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘change position of storefront_shop_messages in Storefront’ is closed to new replies.