• 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

Adding Script to Top of Head

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 › Adding Script to Top of Head

This topic is: not resolved
  • This topic has 5 replies, 2 voices, and was last updated 11 years, 8 months ago by Davinder Singh Kainth.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • May 29, 2014 at 9:05 am #107292
    mrhiking
    Member

    How can I add a script to the top section of the head tag without affecting the Genesis core?

    May 29, 2014 at 9:08 am #107294
    Davinder Singh Kainth
    Member

    1. In WordPress Dashboard, goto Genesis > Theme Settings.
    2. Go to "Header and Footer scripts" section at bottom.
    3. Paste your script in the first box to execute in head tag.


    Sunshine PRO genesis theme
    Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis Themes

    May 29, 2014 at 9:17 am #107298
    mrhiking
    Member

    I need it at the TOP of the head, when I put it there it goes to the bottom of the head.

    May 29, 2014 at 9:26 am #107302
    Davinder Singh Kainth
    Member

    Script will behave same as long it is between <head> and </head>

    Can you specify what script / purpose is required for making script execute in the beginning of <head> for better understand?


    Sunshine PRO genesis theme
    Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis Themes

    May 29, 2014 at 9:28 am #107303
    mrhiking
    Member

    It's a geolocation script. If a user is from a certain country the script redirects them to a different URL. When I put the script where you're saying it loads the CSS first ... then redirects.

    May 29, 2014 at 9:31 am #107304
    Davinder Singh Kainth
    Member

    Ok, refer these:

    http://wordpress.stackexchange.com/questions/98771/wp-head-list-hooked-actions-with-priorities

    http://wordpress.stackexchange.com/questions/57386/how-do-i-force-wp-enqueue-scripts-to-load-at-the-end-of-head


    Sunshine PRO genesis theme
    Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis Themes

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 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