Selective Content in Wordpress
I was reading David Airey’s post called “What are your favourite creative quotes” and having a good laugh at the “You cant polish turd” quote, when I came upon his concern about including quotes in every footer. He definetely expressed a bloggers genuine nightmare of too many outgoing links. I started to type my tip in his comments page, when I figured that the larger population may benefit with this tip.
The solution is very simple, and which I have used quite a bit in the Chilligavva site design.
Place the code wherever you want such as the footer, sidebar, header, only make sure that you thought of the conditions correctly, and you close the braces correctly.
/*checking to see if you are in home page*/
?>
<!– IF YOU ARE ADDING A PHP CONTENT SUCH AS WORDPRESS PLUGIN, ADD THEM WITHIN THE PHP TAGS–>
"YOUR ACTUAL PLUGIN"
?>
<!– IF YOU ARE ADDING ANY OTHER SUCH AS JAVASCRIPT OR HTML, JUST ADD THEM DIRECTLY–>
/* end brace for above if conditional*/
}
?>
Feedback Please!
Note: Your comments may take time to appear, as they are moderated for the first time..
All comments are followed.