The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Best Practices - inserting conditional element in header (2 posts)

  1. marenm
    Posted 5 years ago #


    I am relatively new to PHP and would like to know the best way to conditionally add an HTML element and script to the header.php file of my custom theme.

    I've done a lot of searching around and most of the tutorials out there seem really roundabout and impractical.

    Basically, I'd like to add an HTML 5 canvas element (and then a processing.js script) to the header of my theme on the HOME page only.

    Does anyone have thoughts on this? Can maybe point me in the right direction? I'm a little bit confused about filters and hooks, but that seems like the best way to do it.

  2. marenm
    Posted 5 years ago #

    Oops, sorry, I think this in the wrong forum

Topic Closed

This topic has been closed to new replies.

About this Topic