[Resolved] posts not showing up under proper categories

Home Forums Support posts not showing up under proper categories

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #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 🙂

    #917349
    Tom
    Lead Developer
    Lead Developer

    Strange, 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”?

    #917379
    Alana

    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!

    #917784
    Tom
    Lead Developer
    Lead Developer

    If you use the regular “Post name” permalink structure, does the issue go away?

    #917824
    Alana

    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!

    #917854
    David
    Staff
    Customer Support

    Hi 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 base

    #917859
    Alana

    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!

    #917879
    David
    Staff
    Customer Support

    That 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.

    #917890
    Alana

    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.

    #917930
    David
    Staff
    Customer Support

    In your posts do you have the Category and the Sub Category both selected?
    If so try just selecting the Sub Category.

    #918597
    Alana

    I have both selected because I want that particular post to show up under both the category and subcategory.

    #918614
    David
    Staff
    Customer Support

    Can you try setting it to just the sub category to see if having both selected is causing the problem.

    #918641
    Alana

    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)

    #918667
    David
    Staff
    Customer Support

    The 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?

    #918699
    Alana

    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.

Viewing 15 posts - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.