How to implement very unusual wordpress routing structure?

Been trying the last two weeks to setup an unusual routing structure for a WordPress website but cannot manage to make it work.

Basically there is a custom post type that will get the post url based on the post category(multiple categories) eg: site.com/movie-category/list/movie/

In this there are also news located at: Site.com/movie-category/news/ and for single news it will be site.com/moviecategory/thenews.

Then another one called e.g. articles which are located at: Site.com/moviecategory/list/articles Site.com/moviecategory/list/articles/articlename

A bunch of others too like /blog/post etc

I cannot think of a solid way to handle this without getting messy and hacky, the only way to deal with this is using a permalink redirect plugin.

I've tried a lot, I mean a lot of setups. Timber routing, WordPress rewrites, themosis, headless(this will do but we also get an api call into the single-movie.php (don't ask hehe)) etc etc.

I would happily accept any advice as i feel lost in this

Thank you

Topic routing custom-taxonomy custom-post-types Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.