Title: Changing permalink structures via WP_Rewrite
Last modified: August 22, 2016

---

# Changing permalink structures via WP_Rewrite

 *  Resolved [headonfire](https://wordpress.org/support/users/headonfire/)
 * (@headonfire)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/changing-permalink-structures-via-wp_rewrite/)
 * This is the first time I’m working with WP_Rewrite, I’ve studied Codex pages 
   and some tutorials, but still missing the point. Any help would be much appreciated.
 * I’m building pretty complex site, it will have different sections, one of which–‘
   News’ is native WordPress post type ‘post’ with native categories and tags, and
   other sections are custom post types with own custom taxonomies.
 * Here’s the URL structure I need:
 * `example.com/` – magazine-style home page, uses home.php theme template.
    `example.
   com/news/` – default WP blog (built-in ‘post’ post type), list of all posts (
   index.php template)
 * `example.com/news/%category%/` – (preferred) or
    `example.com/news/category/%
   category%/` – category archive
 * `example.com/news/%category%/%postname%/` – (preferred) or
    `example.com/news/
   category/%category%/%postname%/` – single post
 * `example.com/news/tag/%tag%/` – tag archive (filter)
 * And the same logic for custom post types, for example, `Events` with own custom
   taxonomies – categories and types:
 * `example.com/events/` – events archive (index)
    `example.com/events/%category%/`–
   events category archive `example.com/events/%category%/%eventname%/` – single
   event `example.com/events/%type%/` – events type archive (filter)
 * How can I achieve this?

Viewing 1 replies (of 1 total)

 *  Thread Starter [headonfire](https://wordpress.org/support/users/headonfire/)
 * (@headonfire)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/changing-permalink-structures-via-wp_rewrite/#post-5299073)
 * Ok, support seems to be unavailbale… Meanwhile I figured everything out.
 * To get the ‘news’ part done just use permalinks settings `/news/%category%/%postname%/`.
   For other post types and taxonomies it’s just a matter of proper use of `add_permastruct`,`
   add_rewrite_rule` and other native functions. It is pretty difficult topic for
   those trying to do this for the first time, needs a lot of testing. And Codex
   articles aren’t very descriptive. But once you understand how it works you feel
   yourself the Lord of URLs =)

Viewing 1 replies (of 1 total)

The topic ‘Changing permalink structures via WP_Rewrite’ is closed to new replies.

## Tags

 * [permalink](https://wordpress.org/support/topic-tag/permalink/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [headonfire](https://wordpress.org/support/users/headonfire/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/changing-permalink-structures-via-wp_rewrite/#post-5299073)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
