[wp-hackers] No trigger to act on each post

Otto otto at ottodestruct.com
Mon Aug 25 14:12:49 GMT 2008


Use a filter on "the_posts". This filter gets called when all the
posts are pulled from the database, before anything is displayed. It's
an array of all the posts, you can do as you like with them at that
point.

On Mon, Aug 25, 2008 at 3:34 AM, Malaiac <malaiac at gmail.com> wrote:
> For example, I need to assign and modify exotic metas values before
> they are displayed.
> Some metas are called before the_content, so it can't wait for
> the_content filter
>
> M
>
>
> 2008/8/25, Matthew Martz <mdmartz at sivel.net>:
>> On Sun, Aug 24, 2008 at 7:10 PM, Daniel Torreblanca
>>  <regulatethis at gmail.com>wrote:
>>
>>
>>  > What do you mean you need to act on the "whole post"? the_content
>>  > filter will act on the "whole post" contents. But I'm not sure what
>>  > you're talking about specifically.
>>  >
>>  > On Sun, Aug 24, 2008 at 1:59 PM, Malaiac <malaiac at gmail.com> wrote:
>>  > > I just browsed the code.
>>  > >
>>  > > Standard Loop :
>>  > > while have_posts()
>>  > > the_post()
>>  > >
>>  > > no action trigger in the_post (just the loop_start action)
>>  > > no action trigger in next_post() or setup_postdata()
>>  > >
>>  > > Am I missing something or is there really no way to act on each post
>>  > > before display ?
>>  > > And no, I don't need filters, I do need to act on the whole post..
>>  > >
>>
>> > > Malaiac\
>>  >
>>
>>
>>  I agree...I think filters ARE what you need,
>>
>>  Specifically what data us consideredthw "whole post" that you need to act
>>  on?
>>
>>
>>  --
>>  Matt Martz
>>  mdmartz at sivel.net
>>
>> _______________________________________________
>>  wp-hackers mailing list
>>  wp-hackers at lists.automattic.com
>>  http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list