Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Display posts from post_type with a certain tag only

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #38798
    MikeyC86
    Member

    Ok I’m struggling with this.

    I have a ‘Portfolio’ post type on my website and I have various tags for different items(web design, graphics, logos, etc).
    On a separate page I want to display posts from that post type, but only show posts that have the ‘testimonial’ tag.

    I’ve tried several methods and really can’t figure this out so any help would be much appreciated!

    Thanks in advance!

    #105609
    MikeyC86
    Member

    No tags. I have a special post type, so in the WP Admin area, rather than adding a new ‘post’ I add a new ‘portfolio item’. The individual portfolio items are then filtered by tags(http://en.support.wordpress.com/posts/tags/). I want to display everything from the ‘testimonial’ tag within the ‘portfolio’ type.

    #105617
    MikeyC86
    Member

    Thanks for your help kgscott285, but I didn’t use it in the end :-/

    I carried on using query_posts, but since the testimonials are a ‘quote’ I was able to use this:


    'tax_query' => array(
    'relation' => 'OR',
    array(
    'taxonomy' => 'category',
    'field' => 'slug',
    'terms' => array( 'quotes' )
    ),
    array(
    'taxonomy' => 'post_format',
    'field' => 'slug',
    'terms' => array( 'post-format-quote' )
    )
    )

    Thanks again!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Other’ is closed to new topics and replies.