WordPress.org

Support

Support » Plugins and Hacks » Qtranslate Slug » Advanced slugs on custom post types

Advanced slugs on custom post types

  • Hello,

    I’ve tried for a while now to make the plugin work with 3 level deep slugs on a custom post type but with no result so far. Is there a way to do this?

    This is what I want to achive: http://www.example.com/en/solutions/specialized-solutions/state-companies/

    Where “solutions” is the custom post type, “specialized-solutions” is a parent post in the post type and “state-companies” is another post that belongs to the parent post.

    Also tried to add a custom rewrite rule to work with this but the rewrite hits the rule created by the qtranslate-slug and goes to 404. (i’ve checked this with a Rewrite Rules Inspector)
    solutions/(.+?)(/[0-9]+)?/?$ index.php?post_type=solutii&name=$matches[1]&page=$matches[2]

    This is my custom rewrite rule:
    add_rewrite_rule('(solutii|solutions)/([^/]*)/([^/]*)(/[0-9]+)?/?$','index.php?post_type=solutii&name=$matches[1]&post=$matches[2]&page=$matches[3]','top');

    What do you think about this? Do I have a chance to make this work somehow?

    Thank you in advance,
    Victor

    http://wordpress.org/extend/plugins/qtranslate-slug/

  • The topic ‘Advanced slugs on custom post types’ is closed to new replies.
Skip to toolbar