+1 for this – how many people do we need before Elliot considers implementing a Map field type which allows you to use either Google Maps or OSM?
Hi, where you are outputting your text, wrap it in something like this:
<?php if (!get_field('text_input')) : ?>
<h1>I will be hidden if the 'text_input' contains any text.</h1>
<?php endif; ?>
The above will only display the H1 tag if there is no text on the field text_input
in the backend.
Let me know how you get on 🙂
Try this:
if (function_exists('acf_add_options_page')) {
//Create the parent.
$parent = acf_add_options_page(array(
'page_title' => 'TEST',
'menu_title' => 'TEST',
'redirect' => false
));
//Create the children.
acf_add_options_sub_page(array(
'page_title' => 'Header',
'menu_title' => 'Header',
'parent_slug' => $parent['menu_slug'],
));
acf_add_options_sub_page(array(
'page_title' => 'Footer',
'menu_title' => 'Footer',
'parent_slug' => $parent['menu_slug'],
));
acf_add_options_sub_page(array(
'page_title' => 'Accommodation',
'menu_title' => 'Accommodation',
'parent_slug' => $parent['menu_slug'],
));
}
I found this on the documentation, see the bottom example “Custom options sub page”: https://www.advancedcustomfields.com/resources/acf_add_options_sub_page/
Anyone? This is kind of urgent, I’ve tried deleting the field and recreating the flexible content layout again, still the issue persists.
Would appreciate a reply.
Thanks
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.