admin管理员组

文章数量:1122846

I have a landing page that follows the same UI but depending on the URL path, it will render different content. for example the base URL is sitename/lp/top10/. following that it will either be A or B which is supposed to point to two different categories and then under either A or B there are a list of category names.

Custom post types have been registered as A or B and field groups have been created on the dashboard and I've create posts as examples. I then create a taxonomy in ACF as a_category and b_category and assigned it to A or B in custom posts. in the code i set up a default redirect when a user clicks on sitename it redirects to sitename/lp/top10/[A] but when i add a category name to that it will render the same posts as sitename/lp/top10/[A].

My question is how can i get the url path slug to provide a list of all the posts that pertain to the given category name at the end of the url. i've only gotten so far is to sitename/lp/top10/[A or B]. Essentially can someone guide me on how I can group contents into two buckets that each have sub-categories that contain posts that are assigned to categories with A or B accordingly?

Also since this is just a landing page i have everything content-wise in my index.php where it dynamically renders sitename/lp/top10/[A or B] and my settings>permalinks is set to plain because anytime i change it to custom it breaks. otherwise i have my header in header.php and footer.php but since this was a landing page that was static i didn't think to create single-{name}.php and archive-{name}.php.

thanks!

本文标签: permalinkstaxonomies ACF Wordpress