Support

Account

Home Forums Backend Issues (wp-admin) Adding ACF Fields to a Custom Plugin

Helping

Adding ACF Fields to a Custom Plugin

  • Love the ACF plugin by the way. Here’s what I would like to do with ACF…

    1) I would like to add some ACF fields to a custom plugin that I that I have created. I just want to add a field group to a page in that particular plugin (more precisely a tab within that page).

    2) In addition I would also like to register or show a field group based on some selections made by the user within that plugin. Is this possible? If not I can I can just go with a field group on an options page.

    Thank you very much for the help.

  • I’ve created several plugins that use ACF.

    For 1, you’ll need to use an options page and add it as a sub page of any other pages you have for the plugin.

    As far as 2 goes, this is possible. You’ll need to define your field groups in PHP and add them based on the selections. I generally built the groups in ACF and then export them. Once I have them there I start break them apart and building the code to add them where and when they need to be added

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.