HELP: Query Posts by Custom Field Meta Value
-
Hello,
I searched through the forums and found some solutions but I was unable to solve my problem.
The Code
<?php $winething = get_post_meta($post_id, "wine type", true); query_posts('post_type=wines&orderby=title&order=DSC&meta_value=' . $winething); ?>
What I am trying to do
The code above shows what I am trying to do, use a custom field value in the key ‘wine type’ to filter my query posts.What is happening
All the custom posts are being displayed as if they all have the same custom field value(they do not).Thank you for your help in resolving this matter.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘HELP: Query Posts by Custom Field Meta Value’ is closed to new replies.