• Resolved rentler

    (@rentler)


    Hi,

    I have the premium version and I’m trying to filter the posts by a custom taxonomy. I’ve seen it’s possible to use “tax_query”, but I was not able to understand your exemple. May you help me: the custom taxonomy I created is “type” and the slug I want to use is “serie”. Thanks a lot. Ronaldo

    PS.: I tryied to use the contact form on your website, but it didn’t work.

    http://wordpress.org/plugins/tpg-get-posts/

Viewing 1 replies (of 1 total)
  • Plugin Author Criss Swaim

    (@cswaim)

    My hosting service has been changing their network and the site has been up and down. The contact page is working now. Thanks for the heads up.

    Tax_query:

    from the codex on wp_query, the format of the taxonomy query is

    'tax_query' => array(
    		array(
    			'taxonomy' => 'people',
    			'field' => 'slug',
    			'terms' => 'bob'
    		)

    To create this structure to pass as a parameter through the plugin, use:

    tax_query='{"taxonomy":"type","field":"slug","terms":("value1","value2")}'

    if you are testing more complex taxonomy, then the relation option is required and each taxonomy must be created as a separate array, which is what the example is trying to show.

Viewing 1 replies (of 1 total)
  • The topic ‘custom taxonomy’ is closed to new replies.