• Hi there,

    It would be great if I could have some help with this, as it is a bit of a mystery as to how this worked and now doesn’t.

    I have found this plugin easy to use and that it carried out exactly the job I hoped it would. However, I checked this morning, and it now does not perform quite the same way. I shall explain:

    Under the, ‘Permalink Settings for Custom Post Types,’ I have it set to /%category%/%postname%/ for a particular custom post type. So, the url for posts goes:

    https://siteurl/custom-post-type-name/custom-post-type-category-name/post-name

    and the url for a custom post type category went:

    https://siteurl/custom-post-type-name/custom-post-type-category-name/

    But, now it does not. It look like this:

    https://siteurl/custom-post-type-category-name/

    So, the custom-post-type-name is missing from the url. I have no idea what has changed as I have not changed anything in the settings.

    Any help that can be provided would be most appreciated.

    With kind regards,

    SYPOMark

Viewing 2 replies - 1 through 2 (of 2 total)
  • I think you’ll find that the value /%category%/ won’t work on your custom post types it’ll only work for default posts I think.

    You need to find the actual category name value from your custom post type.

    How depends on how you created the custom post type: If you used a plugin open the plugin up and look at the list of custom types – make sure taxonomies are on and the find the name of categories and use this /%custom-category%/ instead of /%category%/

    If you used code to add the custom post types open your functions.php file or wherever you coded the custom post type and look for this…

    register_taxonomy( 'your-custom-category', 'your-custom-post-type-name' , $args );

    and use the value of the custom category from the register_taxonomy line

    Thread Starter SYPOMark

    (@sypomark)

    Hi Simon,

    Thanks for your help on this.

    I sort of suspected that what you’re saying was right. I do remember having SOMETHING in the functions.php file that set the URLs as I wanted, but I now seem to have lost it. GRRR! I’ll have to go back and see if I can remember what I’ve lost.

    Thanks again and I hope that you and your family are all well.

    With kind regards,

    Mark

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Category links used to work now don’t’ is closed to new replies.