• 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

Need help pulling in a footer script on homepage only

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 › Need help pulling in a footer script on homepage only

This topic is: not resolved
  • This topic has 4 replies, 3 voices, and was last updated 11 years, 4 months ago by Brad Dalton.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • January 7, 2015 at 12:25 pm #136296
    Bill
    Participant

    I have a script that I need to run a task on on the homepage of the website. The task works if I put this script in the GENESIS SETTINGS area in "Footer scripts" field, However, I only want this script firing on the homepage. The GENESIS SETTINGS footer script field applies it site-wide.

    I also tried a functions file entry with an register and enqueue of this simple script, but the task I need only seems to work if the script code is in the actual homepage source code, and not called in from a separate enqueued file. (I did test the functions file approach, and the script enqueue was working (the refenence was in the footer code, and when I clicked the link, it did pull up the script) ...but the task I need didnt work using this manner.

    Can anyone provide insight as to how I can have the following script appear in the footer source code on the home page only?

    <script>
    dsidx.activate('results');
    dsidx.activate('search');
    dsidx.activate('auth');
    dsidx.pluginVersion = '2.1.5';
    dsidx.pluginUrl = '/wp-content/plugins/dsidxpress/';
    dsidx.idxActivationPath = '/idx/';
    dsidx.wp_options = {"ResultsDefaultState":"listmap"};
    dsidx.contentDomId = '1379095184';
    dsidx.mapStart = {
    zoom: 8,
    latitude: 28.062285999812,
    longitude: -81.688842773438
    }
    </script>

    January 7, 2015 at 3:42 pm #136310
    John
    Participant

    Your Genesis child theme should have a scripts section below your page content in the editor. You would paste the code you gave, including the <scripts> tags and save it. That should be it.

    January 7, 2015 at 3:47 pm #136311
    John
    Participant

    It would be the section in this image.

    Scripts section of page editor

    January 7, 2015 at 4:16 pm #136315
    Bill
    Participant

    Hi John,
    thank you for your response. I am looking for the homepage only. not an internal page which has the editor to add a script.

    January 7, 2015 at 11:39 pm #136337
    Brad Dalton
    Participant

    Add the is_home() or is_front_page() conditional tag after the function

    And the !is_admin() tag as well.

    Load scripts conditionally


    Tutorials for StudioPress Themes.

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