Support

Account

Home Forums Add-ons Repeater Field Including Repeater Add-on in PHP Export?

Solved

Including Repeater Add-on in PHP Export?

  • I recently bought the Repeater Add-on for ACF. However since I started using it I’ve been unable to export my ACF set-up into a custom plugin.

    Previously I took the PHP code created in the ‘Export’ page, and merely added it to functions.php via a custom plugin. I’m assuming I need to include the Repeater Add-on in some manner.

    Under instructions it says ‘To activate any Add-ons, edit and use the code in the first few lines’. I’m fairly new to PHP, so I’ve Googling this and tried several recommendations without luck.

    I would appreciate any feedback!
    Schalk

  • I think I need some more information. When exporting a field group with a repeater field they seem to export correctly in the PHP code.

    Or are you talking about getting the repeater field to work in the plugin on another site? If this is the case then the other site needs to have both ACF and the repeater add on installed. Or you can include them as part of your plugin. http://www.advancedcustomfields.com/resources/including-acf-in-a-plugin-theme/?version=4

    There are some restrictions about including add ons in plugins, the main one being that they need to be premium plugins because you are not supposed to give away the add on.

    Hope that helps. Let me know.

  • Thanks for the speedy reply John – really appreciated!

    Yes, I’m trying to export a ACF group into a plugin. This is for usage on my own website.

    I share the website with other Admins, and I don’t want them to fiddle with the fields or create their own ACF groups. Therefore, I’m trying to uninstall the base ACF plugin, while still keeping the fields as set up in ACF. I assume that exporting it into a plugin is the best solution?

    I tried using ‘include_once’ before and it broke the site. I will try again and let you know if I have better luck this time. 🙂

  • You’re not going to be able to remove the ACF plugin and add on. Even if you put the fields into a plugin ACF will still need to be installed for anything to work.

    If you don’t want to anyone else to fiddle with things you can hide the menus for ACF. http://www.advancedcustomfields.com/resources/how-to-hide-acf-menu-from-clients/

  • That solves my problem. Thanks John!

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

The topic ‘Including Repeater Add-on in PHP Export?’ is closed to new replies.