We’d like some ACF pro field groups including gallery or repeater rows to be able to be included inside the post content. So a non-techie content author can easily create content in this format:
Text .. [ACF field group with repeater row fields] .. More Text .. [Image] .. More Text .. [ACF field group with some custom fields] .. [ACF Gallery] .. More Text
This gets into ‘page builder’ space, which is now further muddled with the idea of ‘blocks’ etc. Personally I detest WP’s implementation of this idea in Gutenberg. Way too much junk code, and it’s hard to create blocks where the content author does NOT get to touch any design elements…and have the user-filled blocks write UIKit or BootStrap code in the background via theme templates.
So, my question: is there any other mechanism to achieve the above with Classic editor and ACF metaboxes? We love the metaboxes when the content is well known and structured. But in the above use case, people want not really a full blown page builder but just some specific “inserts” inside the main content. The location of these inserts is not standard, it varies post by post.
Welcome any thoughts or pointers!
Basically, instead of a full Gutenberg style system, or a full blown page builder, we would love to have a few specific “Add Section” buttons on the content TinyMCE textbox, like the already existing “Add Media” button which is only for images. We’d like that kind of a button for ACF field-groups, I suppose. Is this possible?
(Oops, I don’t know how to undo that ‘this solved my question’ thingie. Confusing.)
What you’re asking for is not really possible unless you write your own shortcodes for various types of fields that are not covered by the basic acf shortcode.
I think I have another approach: flexible content. That kind of works. Any issue you foresee with that?
Secondly, do ACF fields themselves have shortcodes?
Flexible content is what I use, I was just trying to answer based on adding field to “the content”. You are not the only one that is not happy with the direction of WP and guberbug. I use flexible content to give clients the ability to add “sections” of a page in any order they want, or even to add the same layout multiple times. It may not seem like a page builder, but it is. You’re just not using a monolithic page builder. We design the admin and the flex fields to meet the specific needs of each client so that they can just “add content” without needing to, or being allowed to, alter the design of a page or even a page element, at least not beyond the controls that we give them.
Even where we are not doing this we are now replacing the standard WP editor with an ACF WYSIWYG field. This way we do not use the block editor at all and we are not dependent on the classic editor either since it’s future support is not likely.
ACF does have it’s one shortcode, it’s extremely simple and it only works with simple text based fields. It’s not something you can use in the way you’re looking for https://www.advancedcustomfields.com/resources/shortcode/
Super. This echoes all my thinking. Love ACF! Thank you for taking the time to explain. Much appreciated!
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!
© 2019 Advanced Custom Fields. Subscribe