I asked the support and they replied that the presentation settings were meant for the use on the Classic editor and not the block editor.
Thanks. That worked for me. (added missing ‘function’)
add_filter('acf/get_post_types', 'include_private_post_types', 20, 2);
function include_private_post_types($post_types, $args) {
if (!in_array('post', $post_types)) {
$post_types[] = 'post';
}
return $post_types;
}
Can you show me how to apply the filter code correctly? I’m lost. Thanks.
Thanks. It works for my custom post type
Strangly, it doesn’t work with the WP ‘post’ post type.
I changed the arguments as follow, but ‘Post’ is not visible in ACF Location Rules.
function change_post_type_args( $args, $post_type ) {
if ( $post_type !== 'post' ) { return $args; }
$args['public'] = false;
$args['show_ui'] = true;
return $args;
}
add_filter( 'register_post_type_args', 'change_post_type_args', 10, 2 );
Thank you. It works.
The ACF class names changed and so you need to adjust that. This one works for me:
add_action('acf/input/admin_head', 'my_acf_admin_head_flex');
function my_acf_admin_head_flex() {
?>
<script type="text/javascript">
(function($) {
acf.add_action('ready', function(){
$('body').on('click', '.acf-fc-layout-controlls .acf-icon.-minus.small', function( e ){
return confirm("Tem certeza que irá deletar este item?");
});
});
})(jQuery);
</script>
<?php
}
If anyone knows if this already exists, I’d love to hear about it. If not, this piece would make this already awesome plugin the best page builder on the market.
+1
Page Builder by SiteOrigin and ACF would be a perfect couple. PB is very flexible, you can duplicate elements, save layout templates and more. Unfortunately PB and ACF are not compatible yet.
For now plugins like this (beta) trying to solve that:
https://github.com/Angrycreative/ACF-Page-Builder-Field
I tried similar with ACF only, but its native UI is to bulky for a good user experience when it comes to more than two columns and many elements within.
ACF support for Page Builder would be awesome. I’m following this thread for a while now hoping to get good news one day 🙂
Page Builders slim UI and the way it handles content editing makes it suitable for simple and complex layouts.
In a perfect world I see the Flexible Content Field improved to do just this natively.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.