I'm making a plugin and I need to get the URL stay that way:
user/ => post_type ( I really need use it like post type. I have tried use the user's page first ) user-name/ => any value to match with username musics/ => another post_type music-category-slug/ => category defined inside musics post_type page/ => page 1 => number of the page
Note: musics => are a post_type but I just need get the music-category-slug.
add_rewrite_rule( 'user/?([^/]*)/?(musics/)?([^/]*)/?(/page/([0-9]+))?/?$', 'index.php?post_type=user&username=$matches&musics=$matches&paged=$match', 'top' );
I can not see where is my wrong.
Please, can anybody help me?
Thank you in advance!