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.
- The topic ‘Best Practices – inserting conditional element in header’ is closed to new replies.