WordPress.org

Ready to get started?Download WordPress

Forums

Tag Groups
New permalink tag base using %tag-group% ? (3 posts)

  1. JSlice
    Member
    Posted 6 months ago #

    Hi,
    First of all thanks for this nice plugin, it works like a charm.

    I'd to replace the default tag permalink structure by something based on Tag groups. ie. Instead of having "site.com/tag/volkswagen", I'd like to use the tag group to dynamically change the base, to become: "site.com/car/volkswagen"

    How can I do this please?

    Under Sttings -> Permalinks, there's an option to change the tag base, so I've put %tag-group%.

    But how to register this new structure then ?

    Thanks!

    http://wordpress.org/plugins/tag-groups/

  2. Chris
    Member
    Plugin Author

    Posted 6 months ago #

    Hi, I think I was checking that option before after a similar inquiry but couldn't find anything simple enough to have multiple bases.
    I'm not sure I've understood the approach with %tag-group% - can you use variables in the permalinks field?

  3. JSlice
    Member
    Posted 6 months ago #

    Yes, you can use custom variables in the permalinks field. Idea is to create a custom variable, and then register & hook it using existing WP rewrite class:
    http://codex.wordpress.org/Class_Reference/WP_Rewrite

    I've seen people explaining how to do this for categories, but nobody for tags (certainly because by default WP doesn't have an option to categorize tags).

    Anyway it's the exact same system (terms) so I guess it's possible, I just have no idea of how doing it.

    Thanks for your quick reply!!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.