• 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 third part js to metric theme?

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 › General Discussion › add third part js to metric theme?

This topic is: not resolved

Tagged: adding js, hooks, java script files

  • This topic has 3 replies, 2 voices, and was last updated 12 years, 6 months ago by Lauren @ OnceCoupled.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • April 21, 2014 at 2:32 pm #101711
    fotodog13
    Participant

    Hi All,
    I need to add a java script file to the metric theme for call tracking software that this client uses. I am wondering about the best way to add it. This is what I was thinking of doing in the Genesis >theme settings>wp_head() I would add
    <script type="text/javascript" src="uploads/callookup/js/lookup.js"></script>

    On the server in my wp-content/uploads directory I would create a folder called callookups that I place the js/lookup.js

    I think this would work but looking for some advice before I do it so I don't do something thats going to cause a huge problem I am not thinking about on the site.
    As always any help is greatly appreciated- If there is a better way to do this let me know

    ** I still have not really mastered hooks but think this might be something that could be done with that, am I on the right track with that thinking?

    thanks

    Scott V

    http://aiellohomeservices.com
    April 21, 2014 at 6:00 pm #101751
    Lauren @ OnceCoupled
    Member

    I would enqueue:
    http://codex.wordpress.org/Function_Reference/wp_enqueue_script

    Best,
    Lauren


    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

    April 22, 2014 at 12:05 pm #101908
    fotodog13
    Participant

    Hi Lauren

    Thanks for the reply-
    So I used enqueue- and added an action hook to my functions php file for that-
    If I look at my source code on the site do you know if I would see the js referenced there.

    I am wondering if I added the enqueue correctly ( site seems to be working correctly )
    I was thinking, or rather hoping that I would see some kind of reference to the js file I added using
    enqueue referenced in the header tag , and I don't.

    April 22, 2014 at 6:21 pm #101969
    Lauren @ OnceCoupled
    Member

    If it's being referenced, it should be visible in your source. What hook are you using?

    //* Enqueue child theme JavaScript.
    add_action( 'wp_enqueue_scripts', 'lgd_enqueue_js' );

    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ 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