WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Type Permalinks
[Custom Post Type Permalinks] possible to use a term slug? (4 posts)

  1. nadine00
    Member
    Posted 2 years ago #

    Sorry for this question. There's not a lot of documentation for this one.

    What exactly does this tag do?

    '%{custom_taxonomy_slug}%'.

    From looking at it, I would like to think that it would be something to dynamically pull a slug, but maybe that is not the case.

    I'd really like a permalink structure of:

    http://siteurl.com/post_type/tax-term_slug/post-title

    eg:

    http://siteurl.com/events/gallery-openings/post-title

    possible with this plugin? I've been trying some re-write code switching around slugs and trying to filter it, but no dice. Was hoping this plugin might help.

    thanks

    Nadine

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

  2. Toro_Unit
    Member
    Plugin Author

    Posted 2 years ago #

    Hi nadine00!

    Thank you for using my plugin.

    If taxomomy's slug or name is tax,
    %{custom_taxonomy_slug}% is %tax%. %tax% is replaced by the taxonomy's term.

    The permalink structure is /posttype/%taxonomy%/%postname%/

    then URL is siteurl.com/posttype/termslug/postname/

    Sorry, but The Documentation is in the make and will be up soon.

    thanks

    Toro_Unit

  3. Xiphe
    Member
    Posted 1 year ago #

    Hello Toro_Unit.

    Maybe i'm missing something but i when i register a taxonomy like this:

    register_taxonomy('work_category', 'work', array(
    	'label' => __('Categories'),
    	'rewrite' => array('slug' => 'mycustomslug'),
    	'hierarchical' => true
    ));

    Your plugin seems to await Urls like this:
    example.org/work/work_category/mycategory/
    While WordPress (using get_term_link($mycategoryID)) is generating this url:
    example.org/work/mycustomslug/mycategory/

    Im using "/%work_category%/%postname%/" as structure.

    If you agree you might take a look at my patch: http://dl.dropbox.com/u/5439509/taxonomy_slug.diff
    Maybe i misunderstood your tutorial - I really would appreciate a hint from you then ;)

    Thanks for this awesome plugin!

  4. Toro_Unit
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for patch!
    The fix add in next version.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic