the_content filter only on first post on main page..how?
-
Hi people!
I’m currently having trouble with this part.. I need only to edit the first( OR ANOTHER.. doesn’t really matter) post of the homepage.. this is because i want to add a jquery script to it.. (which i will do via
wp_head
) but i also need to add some divs because the jquery will interact with it.So i think the best thing to add the divs to the posts/pages via
the_content
. Now this works fine if i have a page with 1 post or page.. but not on the homepage as it will add the code to all posts..Any ideas how to avoid that, and also do you think it’s ok to implement this via the
wp_head
andthe_content
filters???Thanks in advance!
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘the_content filter only on first post on main page..how?’ is closed to new replies.