In my wp site there is a custom post type movies.i used cpt plugin to create it.
so if i have a post with title zootopia
it's url appear as ,
http://localhost/mysite/movie/zootopia/
however i want to change this url to
http://localhost/mysite/parent/movie/zootopia/
.so when i click view post i want this url to appear in address bar
so i want to replace url /movie/
to /parent/movie/
i tried with add_rewrite_rule
function
add_action('init', 'add_actor_url');
function add_actor_url()
{
add_rewrite_rule( '^movie/([^/]*)', 'parent/movie/$matches[1]', 'top' );
flush_rewrite_rules();
}
but this doesn't work.it doesn't replace url http://localhost/mysite/movie/zootopia/
to http://localhost/mysite/parent/movie/zootopia/
is it really possible.if it's not then is there any other way to do that ?