I have underlined and italicized the post titles in homepage via jquery. I have written the jquery code in footer. The header and footer are commonly called in all inside pages and homepage as well. So when I click on the post titles in the homepage, the single post page is browsed but I can still see the same style for the post title like in the homepage. I need to detect the page through url as i have se开发者_高级运维t the url pattern to %post_name% in the admin panel. Moreover I have to place a condition to detect the pages. If it is the homepage I have to enable the code else nothing.
Please help me with this.
Just add a simple:
if (is_front_page()) { do this }
else { do that }
A little bit more about conditional wordpress tags: http://codex.wordpress.org/Conditional_Tags
wp_list_pages function should get you what you're looking for.
精彩评论