0
votes
0answers
20 views

post__in not working with pre_get_posts, but post__not_in does work

I have an action setup on pre_get_posts which I would like to use post__in on. I used the following code as a test: $query->set('post__not_in', array(74485,1528,71460)); This works, the total ...
0
votes
2answers
151 views

Replace Main Query With Custom Query

I want to replace the main query with my own custom query. The thing is I don't want to go through the hassle of manual paging. I know there's a filter posts_results but I'm not sure how to use it ...
0
votes
2answers
71 views

WP_Query articles order by offset in collumns

The code below wants to show a list of articles in two collumns. <?php $i = 0; $the_query = new WP_Query( 'showposts=35&offset=0' ); while ($the_query -> have_posts()) : ...
1
vote
1answer
168 views

Custom Order in WP Query

I'm trying to implement my own query ordering, here is what I came up with... $query = new WP_Query('post_type=contentboxes&include=' . $contentboxes . '&order=ASC&orderby=include' ); ...
1
vote
1answer
113 views

Showing posts from different categories and from custom post type

On my main page, I want to show posts from 3 categories, and 1 custom post type. Is there a way to get them together in one pre_get_posts function? Or do I need to query separately - once for the ...