troubleshooting Question

Issues with custom post type permalinks in Wordpress!!

Avatar of Adam
AdamFlag for Canada asked on
Web DevelopmentPHPWordPress
17 Comments2 Solutions522 ViewsLast Modified:
I have a custom post type I've set up on my site and seem to be running into issues regarding  permalinks.

Essentially, I have a page on my Wordpress site called "Publications". The page also has 5 sub-pages labelled:

- Articles
- Speeches
- Reports
- Letters
- Submissions

I have also created a custom post type and called it "Publications". The post type also has categories that correspond to the 5 sub-pages mentioned above (i.e. Articles, Speeches, etc.). Hopefully that all makes sense so far...

What I've then done is created a template for each of the sub-pages and used query posts to list the posts that fall under that particular category. So all posts with the category "Articles" are listed on the sub-page titled "Articles"…and so on… The permalink that appears for "Articles" at this point shows up like this:

www.mysite.com/publications/articles

This appears to be working, however, the issue comes up when a user clicks on a post link to take them to the individual post. Half of the time, I am receiving a "404 Page not found" message (but not all the time which is strange). When it does work, this is the permalink that appears:

www.mysite.com/publications/post-name (notice the permalink is missing the category or sub-page name— it should read: www.mysite.com/publications/articles/post-name)

I have done some research and a lot of people have mentioned that there will be conflicts if you have a page with the same slug as a category. I've tried playing around with this for quite some time but it just doesn't seem to be working the way I want it to. In the end, I want the individual posts to appear as though they are within the "Publications" section of my site. So I essentially want my permalinks to read like this:

www.mysite.com/publications/articles/post-name
www.mysite.com/publications/speches/post-name
www.mysite.com/publications/letters/post-name
etc...

I've been at this for quite some time now and am stuck. Does anyone have any idea what I need to do to achieve what I'm looking for? Any help would be greatly appreciated.  
ASKER CERTIFIED SOLUTION
jrm213jrm213

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 17 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 17 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros