Forums

Variables + tag_slug__and + query_post does not work (1 post)

  1. Quakebum
    Member
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic