Home › Forums › General Issues › categories › Reply To: categories
I’m not 100% sure what you are asking… but, from what I do understand, it sounds like.. yes, it can be done.
Are you saying that:
a) you want to assign a post to a category
b) display content *below* that post, depending on the category?
If so… here would be my approach:
1) Create an Options Page
2) Add a Repeater Field to the Options Page (call it something like: category-content)
3) Add 2 Sub-Fields to the Repeater, one to choose the Category, one to add the content (a WYSIWYG fields perhaps, or a Textarea)
4) Then… in a custom function, you can leverage the WordPress filter: the_content to append the content to a post, depending on the category
I realize that doesn’t tell you *how* to do it precisely, but if I am correct in what you want… hopefully you have a game plan now where you can dig in and figure it all out.
It’s all doable with ACF and a little PHP code.
Hope that helps!
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!
CPT registration is coming to ACF! We demoed the new feature during the most recent session of ACF Chat Fridays. Check out the summary for the details. https://t.co/k2KQ3WWBAz— Advanced Custom Fields (@wp_acf) March 7, 2023
© 2023 Advanced Custom Fields.