最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Show custom post type relationships by taxonomy

programmeradmin5浏览0评论

I have two custom post types product and review. The product have a custom taxonomy fruits with terms apples and bananas.

All review has a custom field that is a relationship to product, so I can easily choose the product to review (using ACF). For example I might add a review post called "Granny Smith Review" and choose the product "Granny Smith".

In my navbar I have a link called 'Reviews' that points to this url: example/review and my archive-review.php successfully list all reviews.

Question: Is it possible to have a url that points to example/review/fruits/apples or example/review/apples so I can have a dropdown menu called 'Apples' that only shows review with apple term (which is the taxonomy on the product)?

Or if you know any more clever way to structure things I would be glad to hear! Because it feels like I will have a lot of duplicate posts. But what is important is that I have the slug review/fruits/apples or review/apples.

I'm a new developer so I would be very happy with any feedback, thanks!:)

发布评论

评论列表(0)

  1. 暂无评论