The best I can offer you is the code I used to remove the layouts I did not want to show on other post types

// this is an excerpt from my load field filter
// above here I decided if the layouts should be shown
// if not then this code would run
$layouts = $field['layouts'];
$field['layouts'] = array();
foreach ($layouts as $layout) {
if ($layout['name'] != 'product_panel' && $layout['name'] != 'product_specs_panel') {
$field['layouts'][] = $layout;
}
}
return $field;

NOTE: This plugin is very much a work in progress. It includes a small number of layouts now, and will include more as time allows.

A WordPress plugin that provides a collection of useful, reusable flexible content blocks for use with ACF Pro 5. Basic templates included and automatically loaded, can be optionally overridden at the theme level.

This plugin creates a Flexible Content Field below the content editor on Pages and automatically includes content entered there below the_content() on page templates.

Also wraps the_content() in some basic HTML to make it easy to differentiate from the added content blocks.
Thanks & Regards,
Balakrishna yealink voip phone setup

We tried lots of solutions here/there/anywhere and they didn’t work for us, we have a series of complex flex content fields and lots of custom post-types, not all layouts need to be used in all post types. We come out with this, maybe help someone:

The basic idea is to hide the layout from the acf popup.
This hides 3 layouts from the ACF Popup when you click ADD ROW in POSTS.

We tried lots of solutions here/there/anywhere and they didn’t work for us, we have a series of complex flex content fields and lots of custom post-types, not all layouts need to be used in all post types. We come out with this, maybe help someone:

The basic idea is to hide the layout from the acf popup.
This hides 3 layouts from the ACF Popup when you click ADD ROW in POSTS.

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.