WordPress.org

Forums

Custom Post Type Permalinks
[resolved] [9.2] Superfluous element in the permalink structure (8 posts)

  1. Olart
    Member
    Posted 2 years ago #

    Hello!

    My Common Structure:
    http://mysite.com/blog/%year%/%monthnum%/%day%/%postname%/

    Structure for custom post type:
    http://mysite.com/portfolio/%portfolio_category%/%postname%/

    After I updated the plugin to version 9.2
    In the structure of links began to appear extra element "blog"
    http://mysite.com/blog/portfolio/websites/coolsite/

    Tell me how to get back links still mean?

    Many thanks for your great plugin!
    regards

    http://wordpress.org/extend/plugins/custom-post-type-permalinks/

  2. Toro_Unit
    Member
    Plugin Author

    Posted 2 years ago #

    In register_post_type, Please setting parameters rewrite => array( 'with_front' => false ).

  3. Olart
    Member
    Posted 2 years ago #

    Thank you very much! Now everything is as it should

  4. inflatabill
    Member
    Posted 2 years ago #

    I have the same problem, but I cannot find the register_post_type line.

    Where do I find this, exactly?

    Thanks!

  5. Toro_Unit
    Member
    Plugin Author

    Posted 2 years ago #

    Do you create in any way a custom post type?

    Custom Post Type UI can't Setting with_front.

    CPT-onomies
    http://wordpress.org/extend/plugins/cpt-onomies/
    or
    Types - Custom Fields and Custom Post Types Management
    http://wordpress.org/extend/plugins/types/

    is able to set with_front.

  6. bswen
    Member
    Posted 2 years ago #

    Hello,

    After upgrading to 0.9.2 I am having the same issue as the original poster here and I do have the 'with_front' argument already set.

    Here are the arguments for my audio content type:

    $args = array(
        'labels' => $labels,
        'public' => true,
        'publicly_queryable' => true,
        'show_ui' => true,
        'show_in_menu' => true,
        'query_var' => true,
        'rewrite' => array( 'slug' => 'audio', 'with_front' => 'false' ),
        'capability_type' => 'post',
        'has_archive' => true,
        'hierarchical' => false,
        'menu_position' => 7,
        'taxonomies' => array('primarytopic','category', 'post_tag', 'states'),
        'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )
      );

    Yet my URLs for the custom content type all have the 'article' base on them used for the regular post type.

    For instance this URL was:
    http://rhrealitycheck.org/audio/2013/05/05/preachers-daughters-family-physicians-and-generation-roe/

    But after the 0.9.2 update the URL is now:
    http://rhrealitycheck.org/article/reality-cast/2013/05/05/preachers-daughters-family-physicians-and-generation-roe/

    This is causing 404 errors from already existing links coming into my site... any help is much appreciated.

  7. bswen
    Member
    Posted 2 years ago #

    For anyone else experiencing this, I had to revert to 0.8.7 to get back to my links without the standard post URL base. You'll find it here: http://downloads.wordpress.org/plugin/custom-post-type-permalinks.0.8.7.zip

  8. Toro_Unit
    Member
    Plugin Author

    Posted 2 years ago #

    Hello bswen.

    'with_front' is bool.
    'false' is string.
    false is bool.

    Please set with_front' => false.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Type Permalinks
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.