wordpress - Target custom field type plugin value using WP_Query -
Using the CTU plugin, I have typed a custom post in WordPress, which is available with a field named Effect is available. I want to target any post with only available = yes. How would I do this? I tried the_post ('available = yes')
is_post ()):? & Gt; & Lt ;? Php $ the_query- & gt; The_post (); ? & Gt; & Lt ;? Php $ the_field ('Available'); ? & Gt; & Lt ;? Php timeline; ? & Gt; & Lt ;? Php else:? & Gt; & Lt ;? Php endif; ? & Gt; I think the simplest solution is this: 1. Make a word name in your custom classification. Is available 2. Add it to your custom query $ args = array ('post_type' = & gt; 'apartment', 'category_name' = & gt; 'available');
Comments
Post a Comment