• I’m using this to pull in posts in a particular category and to sort by a custom date field:

    query_posts(“cat=$cat_id&showposts=-1&meta_key=news_date&orderby=meta_value&order=DESC”);

    My problem is that the “news_date” field is optional, but if this is not filled in, I still want the post to be pulled in (just without a date).

    How can I achieve this? Can I somehow put a default value in the database so that these posts will be pulled?

    Thanks!

The topic ‘Query Posts Pulling/Sorting Help’ is closed to new replies.