permalinks – What is the best way to relate different custom post types?

Question

I think a better approach for this would be to create a single nested (hierarchical) custom post type.

For example, it can be series.

Then a single series named sample-series as a top level post of series post type: site.com/series/sample-series/.

Then seasons named season-one, season-two etc. can be children of sample-series, like: site.com/series/sample-series/season-one, site.com/series/sample-series/season-two.

Similarly, episodes can be children of those seasons, like: site.com/series/sample-series/season-one/episode-one, site.com/series/sample-series/season-one/episode-two etc.

Same thing can be done by default by WordPress page, since pages are by default hierarchical.

0
Mr Mousio 1 year 2023-02-01T16:49:32-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse