Home › Forums › Front-end Issues › Sort post by category › Reply To: Sort post by category
Hi,
I think I may have an idea on that one, you could create a category called
“Recipes” in that category you would have te following child categories “RecipeCAT1, RecipeCAT2, RecipeCAT3” and so on…
when you create a post you asign “Recipes” and “RecipeCAT1” as categories.
then you could get all the “RecipeCAT” in an array with get_terms
and inside a foreach loop put a wp_query that will get you the post from each RecipeCAT and display them one after the other.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.