I have a custom post type called ‘seasons’ and in there i have 3 categories (summer,winter and spring.)
I want to show 10 random post from the winter category on a page.
Please help.
I have a custom post type called ‘seasons’ and in there i have 3 categories (summer,winter and spring.)
I want to show 10 random post from the winter category on a page.
Please help.
You must be logged in to post a comment.
WP_Query is the solution to your problem.
Go through the available parameters. Just add a query and a loop in your page template and you are good to go.
Ex.
The loop starts here:
and ends here:
You need to add the custom post type in the $args array in the code above by Rohit: