• 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

editing header – genesis theme -vs- child theme edits

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 › editing header – genesis theme -vs- child theme edits

This topic is: not resolved

Tagged: child, child theme, Enterprise Pro, genesis, header.php

  • This topic has 6 replies, 2 voices, and was last updated 11 years, 10 months ago by Brad Dalton.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • July 3, 2014 at 4:20 am #112822
    jhguynn
    Member

    In order to track keywords in a PPC campaign through Google adwords, I need to put the following code after the opening 'php' tag in the header:

    if(!empty($_GET['keyword']))
    $_SESSION['keyword']= $_GET['keyword'];
    if(!empty($_GET['campaignname']))
    $_SESSION['campaignname']= $_GET['campaignname'];

    The only place I can think to do this is in header.php of the genesis parent them. Is this the right move? Is there any way to make this edit in the child theme so I leave the parent untouched? I see no header.php in Enterprise Pro child theme.

    Thanks for the help.

    July 3, 2014 at 4:23 am #112825
    Brad Dalton
    Participant

    You can try using the Header and Footer Scripts.

    Go to Genesis > Theme Settings.

    Or you can hook it from your functions file.


    Tutorials for StudioPress Themes.

    July 3, 2014 at 4:40 am #112829
    jhguynn
    Member

    Thanks Brad. When I add the code to theme settings, it outputs as text at the top of every page. See screenshot here:

    Theme header output - screenshot

    I don't know how to hook the above mentioned code from the functions file, but that sounds like the right solution. How do I do that?

    July 3, 2014 at 4:51 am #112831
    Brad Dalton
    Participant

    Is that all the code?

    Shouldn't because that's where GA code also goes.

    Simply hooks plugin is the easiest solution to execute code in a specific position and each hook field explains exactly where the code executes.


    Tutorials for StudioPress Themes.

    July 3, 2014 at 7:19 am #112845
    jhguynn
    Member

    Thanks again Brad. I use Google Universal Analytics plugin to insert GA code. I'll give Genesis Extender a shot at inserting my code in the header section. If that doesn't work, I'll try the Simply hooks plugin you mentioned. Appreciate your help.

    July 4, 2014 at 5:26 am #112949
    jhguynn
    Member

    Brad: I just realized why my code was displaying as text when placed in the the following location: Genesis --> Theme Settings --> Header and Footer Scripts. I had forgotten to wrap the code in <?php ?> tags.

    July 4, 2014 at 6:29 am #112954
    Brad Dalton
    Participant

    Thought there was a simple reason for that.

    I did look in my Adsense account for that code but couldn't find it as i really wanted to write a post about how to add that code using various methods.


    Tutorials for StudioPress Themes.

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