WordPress ACF "Post Object" Field Type Add-on Plugin Released

As promised, I’m releasing a new plugin for Advanced Custom Fields(ACF) named “ACF Post Object Add-On”. This is a relatively small plugin that appends text data to post titles in the “post object” field type within ACF. The plugin is based on my previous tutorial with a few more bells and whistles to give users more flexibility without having to edit functions.php.

UPDATE 12/22/2016: I’ve also released the plugin via the WordPress Plugin Repository. You can now install the add-on right from the admin of your WordPress site by going to Plugins → Add New and searching for “ACF Post Object Addon”.

I’ve been more busy than usual in the last couple of months, so I’m a little behind in getting this released. I’m making the plugin available on GitHub. If there’s some interest in it, I may do the work necessary to submit it to the WordPress Plugin Repository.

Plugin Settings

Turning this into a small plugin allowed me to create a simple configuration page for some additional control from the admin panel. You can easily choose which standard or ACF field data to add to each post title and how to format it. You can also disable the plugin altogether.

Some simple settings that control how the plugin interacts with ACF.

Some simple settings that control how the plugin interacts with ACF.

The Next Phase

Although the plugin is simple in function, it could possibly do much more. As it stands now, when you enable the plugin, it acts upon every “Post Object” field type being used. However, the plugin could be expanded to control settings for individual “Post Object” fields. For example, appended field data may be different between post types. “Page” posts may need different data appended after the post title versus the “post” post type.

Another possibility is to add the settings to the field when the “post object” field type is added to a field group. Settings for the suffixed field data and format can be individual choices just like the “Return Format” or “Filter by Post Type” options are presented.

The final option is to create new a new field type with its own settings. I think this is probably the cleanest way to handle per-field customization of the suffixed data.

For now, I’ll keep the plugin in its current, simple state. When I’ve been asked to solve the original problem, it was requested that the change be applied globally. I would imagine that this fits with most use cases. If you do use the plugin, please let me know how it works out, and if you have any suggestions, I’m all ears. Enjoy!

About

Hubby, Daddy, Web Developer.

Add Your Thoughts

Your email address will not be published. Required fields are marked *