Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #14636

    Any help would be appreciated. Trying to get theme to output portfolio entries using tags:

    $args = array(

    ‘tax_query’ => array(

    array(

    ‘taxonomy’ => ‘portfolio_entries’,

    ‘field’ => ‘id’,

    ‘terms’ => 51

    )

    )

    );

    $current_category_loop = new WP_Query( $args );

    Can’t seem to resolve this…

    #84297

    Sorry if this was too obscure or wierd as requests go, I have enabled tags on the portfolio taxonomy, but I’m not sure how to access these tags in the database to return portfolio posts with the same tags…

    I found something using ‘tax_query’:

    $myquery = array(

    array(

    ‘taxonomy’ => ‘category’,

    ‘terms’ => array(‘foo’),

    ‘field’ => ‘slug’,

    ),

    array(

    ‘taxonomy’ => ‘post_tag’,

    ‘terms’ => array(‘bar’),

    ‘field’ => ‘slug’,

    ),

    );

    query_posts($myquery);

    But it isn’t working how it is above, do you think I am even in the right ballpark?

    #84298

    Can anyone help please?

    #84299

    Hi!

    Did you try something like:

    $args = array(
    'tax_query' => array(
    'relation' => 'OR',
    array(
    'taxonomy' => 'portfolio_entries'
    )
    ),
    'tag__in' => array('projects','branding')
    );
    $query = new WP_Query( $args );

    Best regards,

    Peter

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Can't seem to get portfolio tags to work as normal tags on tag page.’ is closed to new replies.