Changes between Initial Version and Version 2 of Ticket #16329
- Timestamp:
- 01/21/2011 02:28:21 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #16329 – Description
initial v2 1 1 I am trying to build a search highly customized for a website. The two things I would like to do is to make posts which have the term in their title show up first, and I am also trying to make it play nice with query_posts. 2 2 3 I wrote two queries, one gets all the post ID's which have the term in the post title, and the other gets the post ID's which do NOT have the term in their title, but have it in the contents. I then merge these arrays. I use the resulting array of id's in the "post__in"parameter of query_posts.3 I wrote two queries, one gets all the post ID's which have the term in the post title, and the other gets the post ID's which do NOT have the term in their title, but have it in the contents. I then merge these arrays. I use the resulting array of id's in the {{{post__in}}} parameter of query_posts. 4 4 5 This does result in the correct set of posts being returned, but I am unable to order them in the order the post ids are in the "post__in"clause. This would be important, since the array of post ids is in the correct order, but query_posts rearranges the results. I have tried using "none" as the orderby, but to no avail, it just sorts the posts by ID.5 This does result in the correct set of posts being returned, but I am unable to order them in the order the post ids are in the {{{post__in}}} clause. This would be important, since the array of post ids is in the correct order, but query_posts rearranges the results. I have tried using "none" as the orderby, but to no avail, it just sorts the posts by ID. 6 6 7 It would be nice if there was an option to sort by "post__in", meaning that the order of the posts returned corresponds to the order of the posts in the "post__in"clause.7 It would be nice if there was an option to sort by {{{post__in}}}, meaning that the order of the posts returned corresponds to the order of the posts in the {{{post__in}}} clause.