- This topic has 17 replies, 3 voices, and was last updated 6 years, 3 months ago by
David.
-
AuthorPosts
-
June 1, 2019 at 2:02 pm #917323
Alana
Hi,
I set up my website structure as follows:
-Destinations (category)
*North America (subcategory)
*Central America (subcategory)
*Europe (subcategory)
*Asia (subcategory)-Travel Smarter (category)
I would like my blog posts to show up under both their proper category and subcategory. For the post I published as a test I checked “Destinations” and “Asia” on the post categorization page. However, the post is only showing up in Destinations.
(1) I am concerned that the structure I have envisioned above is not the structure that I’ve executed. Any help checking would be appreciated (I really want to have logical URL pathways reflecting that structure)
(2) When I use the primary navigation menu to click on any of the drop-down options like the “Asia” subcategory, I get a “page not found” message – the blog post should theoretically show up there.
Thank you for your help! I really want to get the structure of the site right so the right posts show up in the right places š
June 1, 2019 at 4:29 pm #917349Tom
Lead DeveloperLead DeveloperStrange, I’m getting a 404 error on all of the pages. Is this a custom post type/custom taxonomy? Can you try clicking the “Save” button in “Settings > Permalinks”?
June 1, 2019 at 6:48 pm #917379Alana
Hey Tom, thanks for the reply!
I don’t think it’s a custom post type/custom taxonomy (since I have no idea what that is lol) – feel free to look at Appearance – Menu Structure.
Under “Settings” “permalinks” I have it marked as “custom structure” https://www.coursecharted.com/%category%/%postname%/ and under “Optional” “category base” I have a “.” (because I didn’t want the word “category” to show up in the URL but maybe I did something wrong by going this route?)
Please let me know your thoughts; I’m feeling very lost trying to get my categories and posts to show up properly.
Thanks again, I really appreciate it!
June 2, 2019 at 7:16 am #917784Tom
Lead DeveloperLead DeveloperIf you use the regular “Post name” permalink structure, does the issue go away?
June 2, 2019 at 8:15 am #917824Alana
Thanks Tom! That does help but then the word “category” shows up in the URL. Is there a clean fix for that so that I can have shorter URLs showing just [category name] / [subcategory] / [post]?
I know there are widgets that do this but I’m hoping for a simple alternative so that I don’t bog the site down with unnecessary code. Thanks again, you’re the best!
June 2, 2019 at 8:52 am #917854David
StaffCustomer SupportHi there,
the custom structure you had before should do exactly that ie.
/%category%/%postname%/
and there should be no need for you to edit the category baseJune 2, 2019 at 9:01 am #917859Alana
Hey David, Tom’s suggestion to use the regular āPost nameā permalink structure is what fixed the original issues. Won’t the custom structure (what I originally had) bring back those issues? Or was the issue caused by the “.” in the category base?
Also, will /%category%/%postname%/ show the proper category-subcategory labels in the permalink (while leaving out the word “category”)?
For example, the current post I’m testing has the “destinations” category and the “asia” subcategory. So I’m hoping the URL follows that same structure [coursecharted.com/destinations/asia/{post name}] Thanks again Tom and David!
June 2, 2019 at 9:59 am #917879David
StaffCustomer SupportThat custom structure is what WP states should be used to display url/parent-category/child-category/post-name – not sure its not working, maybe the category base was the issue.
June 2, 2019 at 10:18 am #917890Alana
When I do that the word “category” is showing up in the URL which is what I wanted to hide. This custom option does not change the structure of the URL from just using the “post name” permalink option. Help with removing the word “category” from the URL would be appreciated.
June 2, 2019 at 11:55 am #917930David
StaffCustomer SupportIn your posts do you have the Category and the Sub Category both selected?
If so try just selecting the Sub Category.June 3, 2019 at 7:26 am #918597Alana
I have both selected because I want that particular post to show up under both the category and subcategory.
June 3, 2019 at 7:45 am #918614David
StaffCustomer SupportCan you try setting it to just the sub category to see if having both selected is causing the problem.
June 3, 2019 at 8:03 am #918641Alana
I tried it but that did not fix the issue. From what I’ve researched so far, it seems like it goes back to the way the theme is coded (but I don’t want to mess with the underlying code so was hoping you or Tom could help by inserting the right code to make the word “category” in the URL go away)
June 3, 2019 at 8:28 am #918667David
StaffCustomer SupportThe theme doesn’t effect how the permalinks are generated. This is controlled by WP.
So to test i added the Custom Permalink of:
/%category%/%postname%/
On this post, i created a sub category and only selected that ( not its parent ):
https://merch.assemblewp.com/merch-styling/sub-category/plugins/
As you can see the permalink contains the full breadcrumb trail. If this doesn’t work for you then there must be something else interfering. Can you check those settings to see if that works?
June 3, 2019 at 9:05 am #918699Alana
I’ve tried the same permalink selection and I’ve tried removing the parent category designation on the post option. Still now working. The word “category” continues to appear in the URL.
-
AuthorPosts
- You must be logged in to reply to this topic.