I do not want to show the latest post on a particular page. I am using a loop per category as I require these loops on various pages.
So the thing is, I am running 3 separate loops for each category, so I cannot use 'offset' => '1' on each loop as the latest post won't always be in all the categories.
I am using 'orderby' => 'menu_order', so I need a rule that says "show posts unless the post's menu order is 1"
I do not want to show the latest post on a particular page. I am using a loop per category as I require these loops on various pages.
So the thing is, I am running 3 separate loops for each category, so I cannot use 'offset' => '1' on each loop as the latest post won't always be in all the categories.
I am using 'orderby' => 'menu_order', so I need a rule that says "show posts unless the post's menu order is 1"
Share Improve this question edited Jan 24, 2019 at 18:31 fuxia♦ 107k39 gold badges255 silver badges461 bronze badges asked Jan 24, 2019 at 17:22 Sony ThePonySony ThePony 1313 bronze badges1 Answer
Reset to default 0If you create your own queries for these loops, all you have to do is to use post__not_in
param in these queries.
This way you will exclude given post from these loops.
And to get the ID of first post, just use get_posts
with 'fields' => 'ids'