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...
14.Aug.2022 | Code Snippets, Stuff i like, Wordpress
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...
So, you have just got your new website and you want to get it to the top of search engines....
Here is a really simple way to create custom tabs for your WooCommerce builds using the ACF Repeater Field. First,...
If you have recently bought a 4k monitor, you may have noticed your Adobe software shrinking to an annoyingly small...