• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Add scripts to woocommerce product categories and shop page

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Add scripts to woocommerce product categories and shop page

This topic is: not resolved

Tagged: scripts to footer, scripts to header, woccommerce

  • This topic has 1 reply, 1 voice, and was last updated 8 years, 9 months ago by frenchie.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • December 31, 2017 at 8:32 am #214990
    frenchie
    Member

    Hi,

    I have 2 web sites using the infinity pro theme with woocommerce. Each is in a different language but represents the same business. At present I am adding hreflang tags to each page using the scripts to header box in the admin panel.

    I also figured out how to do this for the product themselves too

    function my_custom_init() {
    	add_post_type_support( 'product', 'genesis-scripts' );
    }
    add_action('init', 'my_custom_init');

    The problem is I would also like the scripts boxes to appear for the product category pages and if possible the shop page too in their admin panel set ups. I have tried the obvious and searched everywhere without any luck.

    As I have not been able to find out how to do this , I am currently using

    add_action('genesis_meta', 'custom_seo_description');

    Then I am conditionally test for product category pages and handcode in the hreflang tags and meta description that I need. It is basically messy.

    January 6, 2018 at 6:32 am #215138
    frenchie
    Member

    OK it appears that hooks for this do not exist and the best way is to use conditional tests in functions php to insert data.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble