I have 2 custom post types
Offices
Office members
I want the following urls to work
example.com/offices
– Shows the office archive page
example.com/offices/([^/]+)
– Show the single office page
example.com/offices/([^/]+)/members
– Show the members archive page where parent is the office
example.com/offices/([^/]+)/members/([^/]+)
– Show the single member page
I have the following rewrite rules for the office members
All of my urls work except for the members archive page. It loads the template file archive-office_members.php
which is great, but it doesn’t detect the parent office in the url. So instead of it only showing members for that office it just shows all members.
How can I set my url so that it shows the members archive page, but only shows members based on the office
in the url, and so all 4 of my urls work?
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com