I used ACF to add categories to my pages so that I could get posts the match the page’s category in the page template. However, I have been unable to get this to work. The below works for hard using the category:
It gets all posts. Even when I’ve done $sort = get_field('post_sorting'); and used that in category_name=>$sort it grabs all posts. Is there any way I can set it up so that the category I set in post_sorting for the page is used as the category of posts that are gathered?
Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users