danoah 1 Report post Posted November 1, 2011 How do I add a hook that only shows up on posts pages? I want to add a hook that shows up at pagelines_after_secondnav, but only on posts. Share this post Link to post Share on other sites
kastelic 6 Report post Posted November 1, 2011 You would do this using wordpress conditionals: http://codex.wordpress.org/Conditional_Tags Basically an "if" statement. For example, this would only display on the blog page: [code] function myHookFunction(){ if ( is_home() ){ echo "test"; } } [/code] here's an example using "or" operator: [code] function myHookFunction(){ if ( is_home() || is_archive() ){ echo "test"; } } [/code] Share this post Link to post Share on other sites
danoah 1 Report post Posted November 1, 2011 Thank you. Where does the HTML fit in? Share this post Link to post Share on other sites
danoah 1 Report post Posted November 1, 2011 And I was specifically looking for a hook for posts, not pages. Would that just be is_single() Share this post Link to post Share on other sites
catrina 103 Report post Posted November 2, 2011 Which part of the posts area? The hook for the post loop start would be: pagelines_loop_post_start Please read the docs before posting. Please do not private message me unless I ask you to. Designer | Catrina Dulay Founder | Catrina and Mouse Share this post Link to post Share on other sites