[wp-hackers] Messin with queries...

Stefano Aglietti steagl4ml at gmail.com
Sat Feb 28 19:59:10 GMT 2009

On Sat, 28 Feb 2009 13:16:08 -0600, Austin Matzko
<if.website at gmail.com> wrote:

>On Sat, Feb 28, 2009 at 11:29 AM, Stefano Aglietti <steagl4ml at gmail.com> wrote:
>> I can't get a query to get the tags used in last XX days except some i
>> will pass to the query to exclude, I have to do this on WP 2.3 but i
>> can't sort out a uniqe query to get the tags.
>If you want to query for a tag with ID of 3 in the last 5 days, do the
>following (this does work in WordPress 2.3):
>function filter_where($w = '') {
>        $w .= " AND post_date > '" . date('Y-m-d', strtotime('-5 days')) . "'";
>        return $w;
>add_filter('posts_where', 'filter_where');
>        'tag__in' => array(3),

Nice one... :) But i need to get all the tags used in last XX days
with the count of time is used to create a atg cloud that idifferently
the one you can generate using the tag clod WP template tag refer only
to a limited period of time  "most used tags in the laast XX days" tag


Stefano Aglietti - StallonIt on IRCnet - ICQ#: 2078431
Email: steve at 40annibuttati.it steagl at people.it
Sites: http://www.40annibuttati.it (personal blog)
       http://www.wordpress-it.it (WordPress Italia)

More information about the wp-hackers mailing list