Use pre_get_posts or wp_query
-
Hello,
I’m creating a page that puts needs to put two post types and several categories in different sections of the page:
– 1 post carrying the tag ‘featured’ should be on the top in a featured div section.
– After this, a custom post type (events) should show 5 posts in its own div.
– Then, only the most recent or sticky post of each category of the ‘post’ type should be shown in its own div section. ( Imagine four columns, each representing the most recent post or sticky post from that category).
– Last but not least, the normal loop, so including all categories, should be shown, again in its own div.
I was wondering whether this setup would be possible to do with get_posts() and if this is the better option of the two. I’m fairly new to altering the loop (I’m a front-end guy), so some help would be greatly appreciated.
If my explanation is insufficient, please consult this link for a wireframe:
http://community.flagshipwp.com/uploads/default/82/b8c463448291b0a9.png
The topic ‘Use pre_get_posts or wp_query’ is closed to new replies.