• Resolved Solution Architects

    (@solutionarchitects)


    We installed this plugin and found it amazing! It’s simply brilliant and takes care of all of our needs except for one issue: the custom post type name is the same as one of our post’s category slugs and the resulting conflict causes issues.

    How can we get around this issue? I could manually edit the plugin files but this would break each time there’s an update.

    Are there any suggestions?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello @solutionarchitects

    Thanks for Reaching here.

    There is no Issue but it’s a WordPress Rule that you can not use same CPT name and category name , if you do the same it will redirect to archive page.

    Not only category name but also you can not create same CPT name and page name, that will conflict also.

    If you can’t change category name then you need to stop archive page so it will not conflict but by doing that you will not able to use archive page.

    Thanks && Regards.

    Thread Starter Solution Architects

    (@solutionarchitects)

    Thanks for the response, how would I “stop archive page so it will not conflict?” Do you mean stop the category’s archive page or the plugin’s archive page?

    What are the implications of changing the CPT name in the plugin code? I realise updates will have to be manually edited but for SEO reasons, I can’t lose the “news” slug to a plugin.

    Hello @solutionarchitects

    Please go to Plugin Folder -> includes -> sp-news-post-type.php
    replace line no 36 By :

    'has_archive' => false,

    After doing this Please save permalinks from wordpress admin -> settings -> permalinks and Check.

    What are the implications of changing the CPT name : No impacts, You can change CPT name but let us know if you want to run this plugin with WordPress default post.

    Thanks

    Thread Starter Solution Architects

    (@solutionarchitects)

    Thank you, I will try this and if it doesn’t work, I will attempt the CPT name, your suggested solution seems much easier!

    Hello @solutionarchitects

    Does your problem resolve?.

    Thread Starter Solution Architects

    (@solutionarchitects)

    Sorry for the very late reply. This has not resolved the problem but I have made a workaround. I have migrated all standard WP posts to your custom post types and updated the term_taxonomy to the desired news-category. This seems much easier than editing code but thanks for your fast reply!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom Post Type / Slug Conflict’ is closed to new replies.