I’ trying to turn one of hacks into a add-on for ACF to make it neater and to publish it. However im having a hard time finding the resources to help me through that:
1- Can I use existing ACF fields in my add-on? eg: a repeater with multiple text fields? if yes how? what is the right way? I want to show the repeater under the post/page only or as a front-end form.
2- Where do I work on the front-end side of the add-on (the out put)?
Hi, I believe i’m doing both!
I want to create an add-on for AFC to create a new field type, however when you assign that new field to a (eg. post), I need to show a repeater (per-defined) of a new field type and use it’s values to create a custom front-end output.
– To give an example, I want to create a calendar plugin, that can be assigned to any post type.
– It will have a repeater to add events (repeater of text(title), date&time(the new field type) )
– Then in the output will show the calendar with its events
At the moment I have done that by creating theme templates, CPT and exporting ACF code inside the theme, which is utilizes ACF as you said.
well there’s some information on creating your own field type here:
Other than that it sounds like you’re just creating a good old regular plugin.
More info on using ACF in your own plugins here:
Is that enough info?
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
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.