WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Type UI
[resolved] permalink structure problem ? (13 posts)

  1. julienbayle
    Member
    Posted 1 year ago #

    hi there,
    this nice plugin seems to work fine but I have a problem with my urls.

    The new custom type I created is named "works"
    When I'm writing a new "works", the url is http://tld/blog/works/<my_new_works&gt;

    My problem is the blog term...

    Indeed, my permalink custom structure is :
    <tld>/blog/%year%/%monthnum%/%day%/%postname%/

    I have no problem with pages for which urls don't contain "blog"

    any tips ?

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

  2. julienbayle
    Member
    Posted 1 year ago #

    just found a bug probably related to this.
    Even if you modify the Capability Type options while creating a new type, this one keeps at "post" value

    I cannot change it to page.
    Where can I do that ?

  3. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year ago #

    Not quite sure where you're seeing this issue. I just tested it with a localhost install and it's saving the capability type as page. Is it doing the same for you but not accepting anything but "post" for capability type?

  4. julienbayle
    Member
    Posted 1 year ago #

    exactly.
    btw, I'm not sure it is the problem here with my permalink / url stuff..

  5. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year ago #

    May be worth flushing your permalink rules to make sure. Just visit the permalinks settings page, and that should do it.

  6. julienbayle
    Member
    Posted 1 year ago #

    so...
    I flushed the permalink (just for testing purpose, indeed, flushed, permalinks give me errors)
    I changed the capability to page and discovered it kept it (but there is a bug when you click on edit: it proposes you post in the text field (but it keeps the right choice)
    I reverted back my permalink structure
    it works...

    weird :)

  7. julienbayle
    Member
    Posted 1 year ago #

    ooops.
    false positive.

    it doesn't work.
    should I put the rewrite to false ?

    trying

  8. julienbayle
    Member
    Posted 1 year ago #

    http://shibashake.com/wordpress-theme/custom-post-type-permalinks seems to explain well what the problem is here.

    Indeed, in the code generated by your plugin, here mine:

    register_post_type('works', array(	'label' => 'works','description' => '','public' => true,'show_ui' => true,'show_in_menu' => true,'capability_type' => 'page','hierarchical' => true,'rewrite' => array('slug' => 'works'),'query_var' => true,'has_archive' => true,'exclude_from_search' => false,'menu_position' => 20,'supports' => array('title','editor','thumbnail','author','page-attributes',),'taxonomies' => array('type',),'labels' => array (
      'name' => 'works',

    there is no option with_front for rewrite parameter.
    If I could put this option to false, it should work.

    is that code inserted in some file ? or is it dynamically used while a page is called by a visitor ?

  9. julienbayle
    Member
    Posted 1 year ago #

    ok.

    I found the problem and added that "statically" in your code
    I replaced the line 131 & 181 by:

    'rewrite' => array('slug' => $cpt_rewrite_slug, 'with_front' => FALSE),

    everything works nice and smoothly now.
    that would be cool to have that option in your plugin

  10. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year ago #

    Yeah, it may be best to try and use the generated code feature thing and export the CPT settings for the moment if you must. That missing with_front is something I have in the works for version .8 which I hope to have out by this weekend. Just need to debug a couple more things and make sure it's well tested.

    Glad you got it figured out with some proverbial hair pulling. For what it's worth, this plugin stores all of the CPT/taxonomy settings chosen as an option in the db, and then fetches/registers with it all.

  11. julienbayle
    Member
    Posted 1 year ago #

    ok for the storage in db in option.

    and now all is okay :)

    best regards,

  12. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year ago #

    Marking resolved.

  13. julienbayle
    Member
    Posted 1 year ago #

    sure :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic