• hi, i have read in tee wordpress documentation that i if a filter to see some post is applied, this “query” doesn′t go through the Loop.
    so the prob is due to that fact, how could be the results of the filter paginated??
    Thanx

Viewing 14 replies - 1 through 14 (of 14 total)
  • this “query” doesn′t go through the Loop.

    Where did you read that?

    Thread Starter doiches

    (@doiches)

    thanx for the reply, i read it yesterday, as soon as i ceck the historical i post the url.
    But in the other hand if filtering goes through the Loop, why all the post addecuate to the filter conditions are swhowed in the first “main” screen instead of having them paged, as the behaviour of the Search filter, that means, when i am trying to check if a word is contained in the posts, results are paged.???
    Any idea would be more than welcome.

    i read it yesterday

    Where? Are you talking about custom queries?

    Thread Starter doiches

    (@doiches)

    not sure, i modified a plugin which launch a query filtering the post with somo categories. The result of the main function es a php variable called $reult which contains all the posts which follows the fillter, but all together as i said, no page nothing.

    Thread Starter doiches

    (@doiches)

    thanx for the reply esmi,
    i’ve already read this post, especially the query_posts, but i am sure i am doing something wrong because after adding the filter in the plugin php and executing the function, the array of posts …. i am trying right now to implement the loop into the function in the plugin (sounds crazy isn`t it?) but not even working…

    What’s the query?

    Thread Starter doiches

    (@doiches)

    I perform in a function called smart_query teh SELECT * FROM database WHERE and i start mixing a lot of AND & OR in categories to get the results. Everything is storages in a php variable $query.
    I return this variable and the problem appears, pagination and not even the amount of results are showed.
    I tryed some solutions but they are not goot, for example using the LIMIT in the query but it is not ideal isnt it?
    Moreover if you are interested in the php code let me know.

    Thread Starter doiches

    (@doiches)

    cuz i do not know if query_post can handel this example of query:
    Defined Categories:
    1. Size
    1A small
    1B medium
    1C big
    1c1 super big
    1c2 extra big
    2 color
    2A black
    2B White

    now the user would like to check the super big or extra big and white,… here is where i face the problen with WP_query to hand AND and OR so deep level.
    Moreover i added two datepicker so the user and the filter BETWEEN two dates. DOes qeury_post support it?
    so that is the reason cuz i am not able to use the WP_qeury or query_post. ANy idea?

    Are these WordPress categories or custom fields? Or something else entirely?

    Thread Starter doiches

    (@doiches)

    except the dates, all are categories and subcategories

    Then you can use query_posts or WP_Query.

    Thread Starter doiches

    (@doiches)

    what about the date filter (BETWEEN) it is no t a category but a field in the post in DB
    Besides how could be for example this array o categories implemented?
    Category Places:
    subdategory barcelona
    subcategory madrid
    subcategory roma
    subcategory milan
    Categoy Cars
    subcategory Volkswagen (and two descendants in vw)
    sub_subcategory polo
    sub_subcategory coupe
    sub_subcategory beetle
    subcategory Audi
    sub_subcategory tt
    sub_subcategory x7
    subcategory BWM

    an example of query could be the user would like to read all posts of a cars in a cities, for example;
    SELECT …. categories = ( (polo or coupe) AND Audi[all modles]) AND (Barcelona Or Madrid) BETWEEN 01/07/2010 AND 01/07/2011

    Any suggestion? thanks in advance =)

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Pagination a filter result’ is closed to new replies.