custom post type permalink not working wordpress

Sponsors

From WordPress 3.0 version we are able to use the custom_post_type. In installtion time of theme or plugin new permalink structrue will be created and you can easily able to use the custom post type permalink.

If your custom_post_type function is having some issues then wordpress permalink for your custom post type will not work. If your custom post type permalink is not working properly then normally you will get the 404 page and message saying page not found.
Your wordpress does not create the permalink structure aumatically so you need to recreate the Rewrite rules again with wordpress.

If you not added following code in you custom_post_type function then please add the following code:

'rewrite' => array(
 'slug' => 'issue',
 'with_front' => FALSE,
 ),

The right way to use rewrite rule in function is as follows;

register_post_type( 'movies',
 array( 'label' => __('Movies')
, 'public' => true,
'show_ui' => true ,
'rewrite' => array( 'slug' => 'movies', 'with_front' => false )
 ) );

If you are still facing issue and 404 page is coming then go the your wordpress panel -> setting- > permalink page and hit save changes button.
That will flushes the rewrite rules and build rewirte rules again in wordpress.

Incoming search terms:

You may like following Articles!

17 thoughts on “custom post type permalink not working wordpress

  1. I like it! the colours work so well together, as well as the form really improves on his/her’s previous work. The application of goats testicles is really quite innovative!

  2. Hello, this is a certainlyoutstanding blog post. In theory I’d wish to be able to be able to produce like this too – taking time and genuine energy to create a great post.!!!. but what can I say… I procrastinate alot and never appear to obtain anything done. Thank You

  3. Thanks for the rewrite flush tip… I was starting to go a little crazy over here trying to figure out why our new post type was one giant 404.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>