[wp-hackers] How To Append Content To A Post?
scribu
scribu at gmail.com
Tue Sep 7 21:27:16 UTC 2010
On Tue, Sep 7, 2010 at 7:30 PM, Raj <list at expost.org> wrote:
> I meant as part of the loop. Suppose I want to insert an advertisement for
> posts of a particular category only. How would I do this other than by
> receiving the post ID as a part of a filter and then checking if the post
> belongs to a particular category?
>
Inside The Loop, you can just use in_category():
http://codex.wordpress.org/Function_Reference/in_category
The post ID can be accesed via the $post global: $post->ID.
--
http://scribu.net
More information about the wp-hackers
mailing list