Jump to content


Photo
- - - - -

Archive Page Category for Custom Post Types Gives 404

Archive Page Category for Cu

Best Answer Danny , 16 January 2014 - 12:20 PM

Hi Eric,

 

This issue isn't related to DMS, as the same thing will most definitely happen in Twenty Thirteen also. This is because (to my knowledge) there isn't any custom post type permalink structure. So you can't display the category slug in your CPT permalink.

 

So your movie scary post URL will look like this:

 

www.mysite.com/movies/category/scary/exorcist

 

Instead this should work:

 

www.mysite.com/movies/exorcist/

 

http://wordpress.org...-type-permalink

 

To resolve this issue you may want to check out this plugin (untested), also if you search google or the Wordpress support forums, this comes up quite a lot.

 

http://wordpress.org...ype-permalinks/

Go to the full post


  • Please log in to reply
7 replies to this topic

#1 eholland7080

eholland7080

    Advanced Member

  • Members

  • 31 posts
  • Country: Country Flag

Posted 15 January 2014 - 08:21 PM

I have created a custom post type named Movies.  I have created a category named Scary.  I want to see all movies with the category of Scary.  I enter the address of http://www.mysite.co.../category/scary and I get a 404.

What am I doing wrong please?

Thanks

Eric



#2 James B

James B

    Advocate

  • Moderators
  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 16 January 2014 - 12:53 AM

Hi Eric, how have you set up the custom post type? Are you using something like types and views? 

 

Check the slug you have set for the custom post type when you set it up to make sure it matches what you have typed into the url. Are you able to see /movies if you view that.



#3 eholland7080

eholland7080

    Advanced Member

  • Members

  • 31 posts
  • Country: Country Flag

Posted 16 January 2014 - 01:16 AM

Hi thank you for the reply.

 

Yes I am using wp-types to create the custom post type.

 

I am using the Categories taxonomy that is default with WordPress.  I specified that my custom post type can use it.

 

When I go to www.mysite.com/movies I see all movies independent of the category.

 

When I go to www.mysite.com/movies/category/scary or any category I get the 404

 

Thank you for helping me

Eric



#4 eholland7080

eholland7080

    Advanced Member

  • Members

  • 31 posts
  • Country: Country Flag

Posted 16 January 2014 - 02:04 AM

Looks like this was asked previously but I cannot open the link to see what was said even though I am paying DMS dev subscriber.  Can you have a look pls?

 

http://forum.pagelin...ypes-gives-404/

 

Thanks

Eric



#5 eholland7080

eholland7080

    Advanced Member

  • Members

  • 31 posts
  • Country: Country Flag

Posted 16 January 2014 - 05:41 AM

I believe I had this working in a dev site awhile back....just can't remember all that I did to get it working.  Any help would be greatly appreciated.

Thanks

Eric



#6 Danny

Danny

    Is Awesome!

  • Moderators
  • 15194 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 16 January 2014 - 12:20 PM   Best Answer

Hi Eric,

 

This issue isn't related to DMS, as the same thing will most definitely happen in Twenty Thirteen also. This is because (to my knowledge) there isn't any custom post type permalink structure. So you can't display the category slug in your CPT permalink.

 

So your movie scary post URL will look like this:

 

www.mysite.com/movies/category/scary/exorcist

 

Instead this should work:

 

www.mysite.com/movies/exorcist/

 

http://wordpress.org...-type-permalink

 

To resolve this issue you may want to check out this plugin (untested), also if you search google or the Wordpress support forums, this comes up quite a lot.

 

http://wordpress.org...ype-permalinks/


  • eholland7080 likes this

#7 eholland7080

eholland7080

    Advanced Member

  • Members

  • 31 posts
  • Country: Country Flag

Posted 16 January 2014 - 11:59 PM

Thank you both!  Yes that makes sense and does work.



#8 Danny

Danny

    Is Awesome!

  • Moderators
  • 15194 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 19 January 2014 - 12:57 PM

No problem.