The Definitive Guide to Setting Up WordPress in 2024: A Bristol Freelance Web Developer’s Essential Setup
In the ever-evolving landscape of website development, staying ahead of the curve...
To exclude draft posts from appearing in the ACF Relationship field, add this code to your functions.php file.
All you need to do is update “your_field_name”.
add_filter('acf/fields/relationship/query/name=your_field_name', 'relationship_options_filter', 10, 3);
function relationship_options_filter($options, $field, $the_post) {
$options['post_status'] = array('publish');
return $options;
}
ACF, ACF Relationship, Wordpress Function, WordPress Tips
Share
In the ever-evolving landscape of website development, staying ahead of the curve...
In the digital realm, your website serves as the cornerstone of your...
In the ever-evolving world of e-commerce, having a robust and flexible platform...
A quick snipped of code filter parameters into YouTube oEmbed requests. Handy to remove suggested videos, YouTube contols and info....
In the thriving city of Bristol, businesses are constantly seeking innovative ways to stand out in the digital landscape. When...
To allow the editor user role to have full access to Gravity Forms, simply add this code to your functions.php...