Leveraging AI to Supercharge Your WordPress Business Website
In today’s competitive digital landscape, every business website needs an edge to...
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 today’s competitive digital landscape, every business website needs an edge to...
WordPress has come a long way since its humble beginnings in 2003....
In the ever-evolving landscape of website development, staying ahead of the curve...
If you have recently bought a 4k monitor, you may have noticed your Adobe software shrinking to an annoyingly small...
Fed up of getting the W3 Validator warning "The type attribute is unnecessary..."? Here is a handy bit of code to...
Commonly asked eCommerce questions: A nice little bit of information about #PCIDSS for @WooCommerce - http://goo.gl/BSK6Ba Lee Harris - Twitter...