0

I´m not to good at coding so I could use some help with this! I have a single page which below the post shows more posts from the same category. Then I have another single page which in a similare fashion shows more posts from the same taxonomy term as the current post.

I would like to combine this to show posts from the same category and taxonomy term as the current post.

Code for "same taxonomy term": http://pastebin.com/ebpbzfNi Code for "same category" : http://pastebin.com/kB0n49Bd

If someone would help me with this I would be very grateful!

1

Simply add the 'category__in' => $category_id_array argument from your second query inside your first query.

If this doesn't work, make a tax_query, with both kund and post_category taxonomies

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.