• First, thanks for this module: it gives me the all the good things I liked about Drupal in WP (minus Views, which I see is available as a paid plugin).

    Under Advanced settings there is a Rewrite area that allows either the normal WordPress URL logic or a custom URL format with slug. I want my custom post type to simply be the name of the post (ie website.com/custom-post-title). My permalink settings have this setting. But regardless of what option I use in the Advanced Rewrite area of my custom post type, I get the url “website.com/slug/custom-post-title”.

    Any ideas?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Michelle R. Wood

    (@woodmr)

    OK, getting closer to the answer. Under Advanced Settings, choose “Use a custom URL format” and in the space provided type “/”. That way you will have the url permalink:

    [sitename].com/[custom-page-title]

    However, when I click “View Services” I get a 404 Error. Why should that be the case when any other custom url renders a correct page? Also, even if this trick had worked, it would still be a bug since my site’s permalink settings are to render all pages as “post name,” whereas choosing “Use the normal WordPress URL logic” under custom post type renders “[sitename].com/[slug]/[custom-page-title]”.

    Thread Starter Michelle R. Wood

    (@woodmr)

    I found success by visiting the Types support forum and looking at the answer to this question (How to remove Post Type slug from permalinks): what I want requires an extra plugin.

    Installing Remove slug from custom post type allows me to get the url I want.

    That being said, this behavior should really be address in the help text and/or documentation for Types, since I imagine there are others who want a similar url structure for their site. I fortunately had the luxury of using work time to find a fix: the average user may not.

    Thread Starter Michelle R. Wood

    (@woodmr)

    For any true believers that have followed my tale so far, there is a bug in the “Remove slug from custom post type” plugin. Every time you go to add a new custom post type post, an error message will announce

    Remove Slug Custom post type error!
    .htaccess is not writable, please add following lines to complete your installation:
    RewriteRule ^wp-types-group/(.+)$ /$1 [R=301,L]
    RewriteRule ^services/(.+)$ /$1 [R=301,L]
    RewriteRule ^/(.+)$ /$1 [R=301,L]

    This error message is in bright red, so hard to miss (all it needs is “Danger Will Robinson!”) When you publish your post and click View, you will get a 404 error.

    But fear not true believer: this error message is lying. Simply click anywhere else, than try to go back to your page. Voila, like magic, your page points to the correct directory. No need to add anything or change your .htaccess file.

    You can read more about the reasons behind the bug at this thread. For now, it appears an unavoidable messy blight on an otherwise bright solution.

    Thread Starter Michelle R. Wood

    (@woodmr)

    New problem (but related): when making an edit to a custom post type post, the url changes from:

    [sitename].com/[custom-page-title]

    to

    [sitename].com/[custom-page-title]-2

    This same renaming process happens if you delete a custom post type post and recreate it. Delete the post twice and recreate it, you get

    [sitename].com/[custom-page-title]-3

    This behavior occurs regardless of whether the “Remove slug from custom post type” plugin is activated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Types] Rewrite URL w/o slug’ is closed to new replies.