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?

    Thanks

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

    (@cryptex_vinci)

    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 );
    }

    Thanks

    • This reply was modified 6 months, 3 weeks ago by  Asif.

    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.