Title: Custom Struct for Custom Post Type
Last modified: August 21, 2016

---

# Custom Struct for Custom Post Type

 *  [sicdigital](https://wordpress.org/support/users/mac974/)
 * (@mac974)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/custom-struct-for-custom-post-type/)
 * I’m running an event’s blog and I want to have custom permalink structure for
   just these post types. Rather than having [http://url.com/post-type/post-name](http://url.com/post-type/post-name)
   i want to have my permalinks as [http://url.com/author/event/post-name](http://url.com/author/event/post-name).
 *     ```
       add_action('init', 'gs_rewrite_rule');
       function gs_rewrite_rule(){
       $perm_structure = '/%author%/%ln_group_sessions%';
       add_rewrite_tag("%ln_group_sessions%", '([^/]*)', "ln_group_sessions=");
       add_permastruct('ln_group_sessions', $perm_structure, false);
       add_rewrite_rule('event\/([^\/]+)\/', 'index.php?ln_group_sessions=$matches[1]', 'top');
       }
       ```
   
 * I’ve tried a ton of plugins and other solutions, of which this is the latest.
   I can have the permalinks registered and changed throughout the admin but once
   I try to visit I’m getting 404’s.

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/custom-struct-for-custom-post-type/#post-3922182)
 * I believe my first post in this thread applies to your question as well:
    [http://wordpress.org/support/topic/i-want-permalink-to-use-post-tagspostid-how?replies=4](http://wordpress.org/support/topic/i-want-permalink-to-use-post-tagspostid-how?replies=4)

Viewing 1 replies (of 1 total)

The topic ‘Custom Struct for Custom Post Type’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/custom-struct-for-custom-post-type/#post-3922182)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
