Support

Account

Home Forums ACF PRO New Field Type in Theme ACF Folder

Solved

New Field Type in Theme ACF Folder

  • Any tips on how to add custom field types to theme’s ACF? I can download https://github.com/elliotcondon/acf-field-type-template and add it as a plugin, but I would prefer to include it into my theme/acf folder. Adding it to the fields folder seems not the right way either as that directory will be overridden so perhaps elsewhere in the theme, but not sure then how I would load it. Any recommended ways for this?

  • You just need to include the main file from your new plugin. For example if you added the folder /your-theme/acf/my-cusomt-field-type in functions php you would do something like

    
    indclude (dirname(__FILE__).'/acf/my-cusomt-field-type/acf-my-custom-field-type.php');
    
  • Yeah, I thought it would be something like that. Thanks for sharing this @John Huebner!

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

The topic ‘New Field Type in Theme ACF Folder’ is closed to new replies.