WordPress.org

Support

Support » How-To and Troubleshooting » Can you hook a shortcode into an area using functions.php?

Can you hook a shortcode into an area using functions.php?

  • mattmikulla
    Member

    @mattmikulla

    Is it possible to hook into a template area and add a shortcode within the functions.php file.

    I’m trying to avoid adding the shortcode within the template file.

    For example, I’m trying to add a social sharing widget in my single product WooCommerce page.

    This would normally be easy with default plugin functionality but I need to use WooCommerce Conditional Content and it duplicates the social sharing block when a new content block is added to a product page.

Viewing 1 replies (of 1 total)
  • mattmikulla
    Member

    @mattmikulla

    I should note that I’m not trying to create my own shortcode. The social sharing plugins all have there own.

    Everything I’m finding out there is information on creating a new shortcode within functions.php.

Viewing 1 replies (of 1 total)
  • The topic ‘Can you hook a shortcode into an area using functions.php?’ is closed to new replies.