Home › Forums › Add-ons › Options Page › register a taxonomy from an option page › Reply To: register a taxonomy from an option page
Hi @l.pirondini
The register_taxonomy function should be placed inside your functions.php file and should run on every page load.
I can understand what you have coded, but it won’t work with ACF.
You will need to remove the acf/load_field
filter, and the acf/save_post
action code and change your logic to do this.
1. Create a repeater field on the options pages with a text field for the taxonomy name
2. Enter some data into this field on the options page
3. Hook into the init
action in your functions.php file and load the options page repeater field values.
4. Loop through these values and run the register_taxonomy
on each one
Thanks
E
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!
Are you building WordPress sites with ACF and @BeaverBuilder, and wanted to use your ACF Blocks in both the block editor and Beaver Builder?
— Advanced Custom Fields (@wp_acf) May 10, 2023
The BB team recently added support for using ACF Blocks in Beaver Builder. Check it out 👇https://t.co/UalEIa5aQi
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.