Support

Account

Home Forums Front-end Issues Query posts with tag specified by custom field Reply To: Query posts with tag specified by custom field

  • Hi @flowbob

    Becuase your WP_Query uses a literal string 'tag=$tagstr', the variable will not be converted.

    If you wish to use the parameter in this manor, just cahnge to double quotes like so:
    "tag=$tagstr"

    You can also wrap variables like so:
    "tag={$tagstr}"

    Your best bet is to always use an array instead of a string. Also make sure you use the post_type param.

    Thanks
    E