0

I'm creating a wordpress website, And i have created "News" custom post type with taxonomy.

My archive page URL is www.yourwebsite.com/news/ and taxonomy page URL is www.yourwebsite.com/news/india-news/

Now i want duplicate "www.yourwebsite.com/news/" URL to "www.yourwebsite.com/country/".

Both page should be working.

So please let me know how i can create duplicate page. Where i can fetch all the post from the "News" post type. and how i can assign "www.yourwebsite.com/country/" to that particular page.

Thanks Gaurav...

1

Easiest way is to install Quick Page/Post Redirect Plugin.

Then you'll just have to create a new page with the Title (and Permalink) country when editing this page you'll then have the possibility to redirect it to the other page.

  • 2
    I'm not sure if this is a real answer. You will redirect user from one page to another. I guess Gaurav was trying to make both pages to work... – Krzysiek Dróżdż Jul 17 '13 at 12:03
  • I understood that the page should be reachable unter both urls (which would be possible with that plugin). If Gaurav really needs to have to seperate pages you would be right and this wouldn't work with my answer. – user35119 Jul 17 '13 at 12:06
  • Will the page be accessible on both urls with your plugin, or will user be redirected from one to another? It's a little bit different, I guess. – Krzysiek Dróżdż Jul 17 '13 at 12:41
  • Thanks for the reply, Yes, i need both pages working...Bot dont know how i can do this..:( – Gaurav Jul 19 '13 at 11:53
0

You can change SLUG of your custom post type :

    

$post_args = array( 'labels' => $post_labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array('slug'=>'country','with_front'=>false), 'capability_type' => 'post', 'hierarchical' => false, 'supports' => array('title','thumbnail', 'editor' ), 'has_archive' => false, 'menu_icon' => get_stylesheet_directory_uri() . 'icon.png', );

register_post_type('offres',$post_args);

So search this line :

'rewrite' => false,

And replace it by :

'rewrite' => array('slug'=>'country','with_front'=>false),

Don't forget to go at ADMIN > PERMALINK > UPDATE to save the new structure.

I hope this will help you.

Ciao

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.