• I released a plugin 4about a year and a. half ago for 1.2 (https://www.davidsaccess.com/2005/03/13/wp-plugin-dcs-nicer-archives/) that I never upgraded to 2.0, and I have not kept up with the api.

    The problem is with following portion of the code:

    function order_query($query_string) {
    if (!empty($query_string) && !is_feed() && !is_admin()) {
    $query_string .= ‘&orderby=title&order=asc&posts_per_page=99’;

    }

    return $query_string;
    }

    add_filter(‘query_string’, ‘order_query’,1);

    \how do I overide the query params in 2.0?

Viewing 1 replies (of 1 total)
  • Thread Starter dmclark

    (@dmclark)

    on furthe examinntion, I tried:
    function order_query($query_string) {
    global $wp;
    if (!empty($wp->query_) && (!$wp->is_feed) && !$wp->is_admin) {
    $wp->query_string .= ‘&orderby=title&order=asc&posts_per_page=-1’;

    }

    return $query_string;
    }

    add_filter(‘query_string’, ‘order_query’,1);

    still no luck –
    please helr

Viewing 1 replies (of 1 total)
  • The topic ‘Making plugin work in 2.0’ is closed to new replies.