• Resolved Heikki

    (@heikkiwaan)


    Hello.
    I need to do a do_shortcode() on every page storefront_content_top
    all works ok except that i need it not to be in the front page. All other pages than the front page. is_front_page() and is_home() aren’t working….

    i am doing this through a self made plugin.

    Is there a better place to put it than storefront_content_top, if i change the theme in the future?

    My code so far:

    
    // if (!is_home()) // not working.
    add_action( 'storefront_content_top', 'hh_show_shortcode', 1 );
    function hh_show_shortcode()
    {
            echo do_shortcode('[blah]');
            // echo "sample text";
    } 
    
    • This topic was modified 6 years, 4 months ago by Heikki.
    • This topic was modified 6 years, 4 months ago by Heikki.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    Hi there,

    This question seems more related to Storefront than with the core WooCommerce plugin which this forum caters for. For more feedback on this, please open a support ticket for Storefront at: https://www.ads-software.com/support/theme/storefront

    Thanks!

    Thread Starter Heikki

    (@heikkiwaan)

    How is this storefront related?
    In my opinion this is woocommerce, since i would like it to work with any theme.
    But i can ask it there, thanks.

    • This reply was modified 6 years, 4 months ago by Heikki.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add shortcode to all pages except front page’ is closed to new replies.