How do I display an article using a WordPress custom field?

Yes, and you can use the meta_key along with meta_value parameter. Secondly, you’re going to need two queries when there are no featured posts: Query the featured articles/posts: $q = new WP_Query( [ ‘post_type’ => ‘post’, ‘meta_key’ => ‘featured’, ‘meta_value’ => ‘1’, ‘posts_per_page’ => 3, ‘no_found_rows’ => true, ] ); Query random posts: $q = … Read more

WP meta_query args not working in function

You’re very close to it just need to to modify your code little bit. See I’ve update code for you. function my_super_filer_function2($query_args){ global $post; $post_author = $post->post_author; $query_args[‘author’] = $post_author; $query_args[‘post_status’] = array(‘publish’, ‘future’); $query_args[‘meta_query’] = array( array( ‘key’ => ‘zobrazitnatridy’, ‘value’ => ‘Ne’, ‘compare’ => ‘!=’ ) ); return $query_args; } add_filter(‘my_super_filter2’, ‘my_super_filer_function2’);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)