I have a view where I am showing post but I want to show premium post earlier than then normal post. So premium post come 1st and then normal post in every catagories. for premium post I have custom Field checkbox, where it checked its premium post for me. I hope got my point
Is there any documentation that you are following?
The simplest way to do this would be to order the results by the custom field (you can apply a secondary order for the "true" underlying order).
But the problem with that approach is that when WordPress queries for posts and orders by some field, if posts don't have a value for that field then they will be excluded from the results.
So if your checkbox field saves 1 for the premium post and doesn't save anything for the others, the others would be missing from the results.
For it to work you need to make sure that the field saves something, e.g. zero, then unchecked, and that all posts have a value for the field (either 1 or zero).
The topic ‘[Closed] I have view want to show premium post 1st’ is closed to new replies.