Custom Code

This topic is: resolved

This topic contains 3 replies, has 2 voices, and was last updated by  braddalton 1 year, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #29037

    geezer466
    Participant
    Post count: 17

    Good Afternoon All…

    Am using the Associate theme on the G framework.

    I am looking to place some custom code onto the home page. I have set my site up with a static home by use of the widgets.

    I want to place some schema and custom tracking code onto this static home page and this page only so cannot use the hooks function.

    Have searched the web and the general advice seems to be to add the code into the header.php file. When I go look Associate doesn’t have a php header file and the one in the genesis framework says..

    /*
    WARNING: This file is part of the core Genesis framework. DO NOT edit
    this file under any circumstances. Please do all modifications
    in the form of a child theme.
    */

    So I am loathe to touch it.

    Advice please on how I can accomplish what I am looking for.. If the advice is to edit the Genesis php header can you please indicate exactly where I should put the code.

    Many thanks

    #29061

    braddalton
    Participant
    Post count: 8880

    Add it to a custom function or use the Genesis Simple Hooks plugin with a conditional tag for your home page or front page:
    [php]
    <?php if (is_home() ) { ?>
    <p>Code-Goes-Here</p>
    <?php } ?>
    [/php]

    Tracking code should be placed in the Genesis > theme settings > header and footer scripts.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #29069

    geezer466
    Participant
    Post count: 17

    Many thanks Brad…Its easy when you know how eh!!  ;-)

    I need to improve my php knowledge a few notches would you recommend any on-line resources?

    #29072

    braddalton
    Participant
    Post count: 8880

    Try this list http://wpsites.net/web-design/resources-code-best-practices/


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Custom Code’ is closed to new replies.