WordPress.org

Ready to get started?Download WordPress

Forums

Include posts with empty meta value to custom query (1 post)

  1. joschi81
    Member
    Posted 1 year ago #

    Hi there,

    I'm trying to list all existing posts, sorted by a custom post meta field. I want _all_ posts in the result, by all posts where the given mety value is empty are not showing. What do I have to change?

    $query_string  = 'orderby=meta_value&meta_key=easyvote-countdislikes&order=DESC&posts_per_page=-1';
    query_posts($query_string);

    Thanks!
    joschi81

Topic Closed

This topic has been closed to new replies.

About this Topic