Categories and Custom Post Types

This topic contains 9 replies, has 4 voices, and was last updated by  Kiran 4 years, 8 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #507310

    Neil Hall
    Buyer
    Post count: 83

    Hi Support

    I seem to have a problem in the backend with displaying Categories when they are Custom Post Types.

    In the default ‘Places’ it works fine. So in the backend I select Places > Places Categories. I then have a Primary Category and then underneath this several sub-categories, for example ‘Beach’ if I click on the view button it displays all the posts that have the category Beach, as it should. Perfect!

    However with all of the other CPT’s I have set up, for example going to Restaurants > Restaurant Categories, and selecting a sub-category ‘Dutch Restaurants’ it comes up with a 404 error. Even though there are posts in that category.

    Am I doing something wrong?

    Best Regards
    Neil

    #507323

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    how did you add the listing? Import?

    You can try using the tool for taxonomy term counts in

    GD – Status – Tools – Term counts

    Once you do that try resaving permalinks, too
    https://wpgeodirectory.com/docs-v2/geodirectory/status/#tools
    https://wpgeodirectory.com/docs-v2/geodirectory/settings/permalinks/#404

    If we need to check the settings please make a private reply with WP Admin credentials and a login URL.

    #507356

    Neil Hall
    Buyer
    Post count: 83
    This reply has been marked as private.
    #507365

    Guust
    Moderator
    Post count: 29970

    GD is not 100% compatible with Transposh, see https://wpgeodirectory.com/support/search/?bbp_search=transposh

    Thanks

    #507377

    Neil Hall
    Buyer
    Post count: 83

    Hi Guust

    I don’t think Transposh is the problem here. If I deactivate Transposh and clear caches, permalinks etc the problem continues.

    I have found that on the CPT’s the primary category works without a problem. The problem occurs where there is a sub-category.

    As I mentioned above ‘Places’ work in both instances. So I came to the conclusion that it must be something within the Custom Post Types extension where it can not handle sub-categories

    Best Regards
    Neil

    #507383

    Neil Hall
    Buyer
    Post count: 83

    I ran another test.
    In Restaurant I have a sub-category ‘Dutch restaurants’ If I edit this sub-category so it does not have a parent category ie ‘none’ then it will work fine in both the backend and the frontend. This is with and without Transposh activated.

    As soon as I make it a sub-category under ‘Restaurant’ it then does not work. I think it is a problem somewhere withing the Custom Post Type extension.

    Hope this helps

    #507386

    Guust
    Moderator
    Post count: 29970

    I have asked a developer to have a look.
    Thanks

    #507617

    Kiran
    Moderator
    Post count: 7069

    Hello Neil,

    You are using same slug for CPT and main category which creating problem.
    Ex: “Restaurants” CPT has slug “restaurants” & for “Restaurants” category slug is also “restaurants”.

    Try to change slug of category or CPT.

    Kiran

    #507754

    Neil Hall
    Buyer
    Post count: 83

    Hi Kiran

    Many thanks for looking into this. Changed all the slugs on the main categories and now seems to work fine.

    Your the best

    #507755

    Kiran
    Moderator
    Post count: 7069

    Glad to hear that & thanks for letting us know.

    Kiran

Viewing 10 posts - 1 through 10 (of 10 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket