URL Rewrites & Custom Rewrites

When you need to change the URL structure or Rewrite Rules beyond what is provided in the Advanced Options Tab for the Custom Post or Custom Taxonomy.

By default WP presents post-type URL’s like <post-type>/<post-slug>. We use the built-in and custom handling provided by register_post and register_taxonomy so anything beyond that is out of scope for Pods and requires you to look into custom solutions, though you can adjust your rewrite slugs in the Advanced Options of your Custom Post Type and Taxonomy.

We can recommend Custom Post Type Permalinks for expanding on what is available in the Settings, Permalinks screen for your Custom Taxonomies and Custom Post Types.

You might need to define custom rewrite tags in this case, which is well documented at WordPress.org for add_rewrite_tag. It’s also possible that the plugin won’t be enough and you’ll have to define a custom post type rewrite with add_rewrite_rule. You will find wordpress.stackexchange.com a good resource for handling custom rewrite rules.

Questions

  • How do I change the URL Structure for Individual Posts to Match Taxonomy Terms?

    By default WordPress will do the following for your custom post types: post-type/post-type-slug/
    For your Custom Taxonomy it will map it to: taxonomy-type/taxonomy-term/

    You can customize these settings in Pods using the Rewrite, Custom Rewrite Slug and Rewrite with Front options under Advanced Options when editing your Pod. These correlate to the same parameter settings for rewrite from the register_post_type function in WordPress:
    https://developer.wordpress.org/reference/functions/register_post_type/

    You can further customize these values using other plugins like Beautiful Taxonomy Filters or Custom Post Type Permalinks if you’re wanting to put the taxonomy ‘term’ into the slug for the individual item, but that is beyond the capabilities or scope of Pods. We support the default methods, though you can get creative with the rewrite url options mentioned above, but the WP Hierarchy still has to be ‘obeyed’ or you have to have a plugin that recognizes and ‘re-arranges’ the URL’s for SEO practices but not necessarily for organization.

Skip to toolbar