Variables tag_slug__and query_post does not work
-
Earlier,
I had my script as follows:
$what_tag = get_post_meta($post->ID, 'what_tag', $single); $post_args = array('tag_slug__and' => array($what_tag))); $lastposts = query_posts($args);
The script was suppose to display the tag slugs that were inputed from a custom field.
This didn’t work.
Instead, I had to do it this way:
$what_tag = explode(',',get_post_meta($post->ID,'what_tag',TRUE)); $args = array('tag_slug__and' => $what_tag))); $lastposts = query_posts($args);
Is this something to do with WordPress or a PHP thing?
- The topic ‘Variables tag_slug__and query_post does not work’ is closed to new replies.