• Here’s what I’m looking to do:

    1. Grab a taxonomy value from the post
    2. Create a query based on that value
    3. Create a loop based on that query

    Specifically, I’ve got a taxonomy called “client” and I want there to be “Other work for this client” that appears below the post in single.php. This loop will display all other posts that share the same value in the “client” taxonomy.

    I’ve seen multiple threads about creating loops based on a taxonomy query, but they all require you to assign the taxonomy value manually. I need the value to be grabbed from the current post.

    Thanks in advance.

Viewing 2 replies - 16 through 17 (of 17 total)
  • For sure:

    For example. I have my own Custom Post Type named ‘clipping’. I also have my own custom, non-heirerical taxonomy called ‘tag’.

    Say for example I write 3 posts, or “clippings”, and each one is tagged using the ‘tag’ taxonomy like so:

    Post 1: apparel, sun glasses,
    Post 2: apparel, t-shirts,
    Post 3: photography, t-shirts,
    Post 4: art, things,
    Post 5: apparel, stuff,

    When reading Post 2 I should see a list (that I can theme via CSS) of it’s related posts, which in this case would be:

    Post 1
    Post 3
    Post 5

    Does this make sense? I want all posts that have at least 1 term in common with the current post.

    mistercyril

    (@mistercyril)

    @imscissors did you give up???

    I thought we were getting close ??

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Taxonomy-related posts in single.php’ is closed to new replies.