[wp-testers] Quick Question

Paul Robinson pablorobinson at gmail.com
Tue Nov 25 09:31:31 GMT 2008


No the plugin doesn't use the results. The aim of the plugin is just to get
the ID of all the posts from the current pages $posts array & run a DB query
to grab the first image assosiated with each post. The one it picks is
determined by the menu order so that I can choose which image is shown.

It's kinda hard to describe but the main idea is to have the first three
posts in a featured position at the top of the page & then continue a little
further down the page with the next 4 posts. when you go to the next page
instead of keeping the first three as the same posts it would move all seven
forward. In fact it would work exactly like my site does at the minute
http://celeborama.net. I've managed to get it to doe what I wanted by
running a counter during WP's standard loop & using ifs to place certain
HTML elements at certain points. I would think it would be more efficient to
use 2 query_posts(); though, or is it not?

Kinda long winded, but maybe I should have explained it like that in the
first place. Would using two query_posts(); really be more efficient though?

By the way, I forgot to say thanks. So thanks. :)
Paul.

2008/11/25 DD32 <wordpress at dd32.id.au>

> Hm wait, Are you wanting to use the results of the query_post() for the
> plugin? or something else?
>
> Most times when you use query_posts() for a small section of a page, and
> you then want to reset it back to the WP queried posts, you'd call
> wp_reset_query() afterwards to reset it back to the original WP_Query.
>
> That might not be what you're after though...
>
>
>
> On Tue, 25 Nov 2008 12:07:30 +1100, Paul Robinson <pablorobinson at gmail.com>
> wrote:
>
>  Well I have another theme that uses the same plugin which runs fine. I
>> thought it was the way I was running the theme. Do you mean using
>> rewind_posts(); I thought WP did it by itself during each call to
>> query_posts();?
>>
>> 2008/11/25 DD32 <wordpress at dd32.id.au>
>>
>>  if you're using query_posts() and not resetting the original WP_Query()
>>> afterwards, that could be the cause of the problem.
>>> Try it on the default theme, If it works properly, Its the theme, Else,
>>> its
>>> the plugin.
>>>
>>>
>>>
>>> On Tue, 25 Nov 2008 11:43:34 +1100, Paul Robinson <
>>> pablorobinson at gmail.com>
>>> wrote:
>>>
>>>  I'm unsure since I didn't really make the plugin. I've just modified it
>>>
>>>> slightly since the original author stopped developing it. As far as I
>>>> can
>>>> tell it is ran as a regular plugin. I am experimenting with a new theme
>>>> and
>>>> I make two calls to query_posts(); on the same page would that be the
>>>> cause
>>>> of the problem?
>>>>
>>>> I just found it odd since it only starts to be empty from the 2nd page
>>>> onwards.
>>>>
>>>> 2008/11/24 DD32 <wordpress at dd32.id.au>
>>>>
>>>>  the posts array will be set by WP_Query, Pretty sure the line will
>>>> read:
>>>>
>>>>>
>>>>> $GLOBALS['post'] = & $this->posts;
>>>>> (from memory)
>>>>>
>>>>> I cant understand why its not set, Are you perhaps hooking in too early
>>>>> for
>>>>> the posts to have been populated?
>>>>>
>>>>>
>>>>>
>>>>> On Tue, 25 Nov 2008 07:38:15 +1100, Paul Robinson <
>>>>> pablorobinson at gmail.com>
>>>>> wrote:
>>>>>
>>>>>  Hi,
>>>>>
>>>>>
>>>>>> I was wondering, a plugin which is nolonger supported by the author,
>>>>>> but
>>>>>> I
>>>>>> have been maintaining has stopped working. It gather post IDs from an
>>>>>> array
>>>>>> called $posts which is now empty on any page other than the first
>>>>>> page.
>>>>>>
>>>>>> Can anyone tell me if the $posts array has been gotten rid of? In fact
>>>>>> can
>>>>>> anyone tell me when the $posts array is made since I can't find any
>>>>>> mention
>>>>>> of it anywhere???
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> Paul.
>>>>>> _______________________________________________
>>>>>> wp-testers mailing list
>>>>>> wp-testers at lists.automattic.com
>>>>>> http://lists.automattic.com/mailman/listinfo/wp-testers
>>>>>>
>>>>>>
>>>>>>
>>>>>>  _______________________________________________
>>>>> wp-testers mailing list
>>>>> wp-testers at lists.automattic.com
>>>>> http://lists.automattic.com/mailman/listinfo/wp-testers
>>>>>
>>>>>  _______________________________________________
>>>>>
>>>> wp-testers mailing list
>>>> wp-testers at lists.automattic.com
>>>> http://lists.automattic.com/mailman/listinfo/wp-testers
>>>>
>>>>  _______________________________________________
>>> wp-testers mailing list
>>> wp-testers at lists.automattic.com
>>> http://lists.automattic.com/mailman/listinfo/wp-testers
>>>
>>>  _______________________________________________
>> wp-testers mailing list
>> wp-testers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-testers
>>
>>
>
> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers
>


More information about the wp-testers mailing list