Title: Custom Permalink Issue
Last modified: August 19, 2016

---

# Custom Permalink Issue

 *  Resolved [flashpunk](https://wordpress.org/support/users/flashpunk/)
 * (@flashpunk)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/custom-permalink-issue/)
 * I have 2 custom post types on a development blog i’m working on, one of them 
   seems to be working fine, single entry pages, archives, etc.
    However, the 2nd
   one lists fine on taxonomy archive pages, however, any permalinks to single entry
   pages result in a 404 error page. This is in the front end, and also through 
   the admin write panel when clicking on “View Page”.
 * This is my function.php file showing the initialization of the custom post type.
   Any help would be very appreciated.
 * Thank you!
 *     ```
       function post_type_musicians() {
       	register_post_type(
       		'music',
       		array(
       			'label' => __('Musicians'),
       			'singular_label' => __('musician'),
       			'public' => true,
       			'show_ui' => true, // UI in admin panel
       			'_builtin' => false, // It's a custom post type, not built in!
       			'_edit_link' => 'post.php?post=%d',
       			'capability_type' => 'post',
       			'hierarchical' => false,
       			'rewrite' => array("slug" => "musician"), // Permalinks format
       			'publicly_queryable' => true,
       			'query_var' => true,
       			'can_export' => true,
       			'menu_position' => 5,
       			'supports' => array('title','author','thumbnail','custom-fields','comments','revisions','editor','excerpt')
       		)
       	);
   
               register_taxonomy( 'albums', 'music',
       		array(
                    'hierarchical' => true,
       			 'label' => __('Music'),
       			 'query_var' => 'music',
       			 'rewrite' => array('slug' => 'music' )
       		)
       	);
       }
       add_action('init', 'post_type_musicians');
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [flashpunk](https://wordpress.org/support/users/flashpunk/)
 * (@flashpunk)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/custom-permalink-issue/#post-1741135)
 * Anyone? I’m really needing help with this!!
 *  Thread Starter [flashpunk](https://wordpress.org/support/users/flashpunk/)
 * (@flashpunk)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/custom-permalink-issue/#post-1741153)
 * Please anyone?!
 *  [nalins](https://wordpress.org/support/users/nalins/)
 * (@nalins)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/custom-permalink-issue/#post-1741177)
 * I’m experiencing something very similar to this and haven’t been able to find
   a solution for quite some time now. Can anyone help out?
 * Thanks for your time!
 *  [Chris](https://wordpress.org/support/users/chrisilverman/)
 * (@chrisilverman)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/custom-permalink-issue/#post-1741200)
 * You’re doing something a little more difficult and complicated than what I was
   doing – I was having the issue where I’d add custom taxonomies, but the archive
   pages for the tags in those taxonomies would return a 404.
 * I fixed this by “flushing the permalinks”: just going to Settings/Permalinks 
   and clicking “Save Changes” without making any changes. I learned about that 
   here:
 * [http://seanbehan.com/programming/how-to-flush-your-permalink-structure-in-wordpress-when-using-taxonomies-or-wordpress-taxonomies-not-working-instead-i-see-a-404-page/](http://seanbehan.com/programming/how-to-flush-your-permalink-structure-in-wordpress-when-using-taxonomies-or-wordpress-taxonomies-not-working-instead-i-see-a-404-page/)
 * Sorry if this doesn’t fix your problem – it sounded slightly similar to mine,
   so I figured I’d post this.
 *  Thread Starter [flashpunk](https://wordpress.org/support/users/flashpunk/)
 * (@flashpunk)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/custom-permalink-issue/#post-1741203)
 * This has been resolved. User error on my part, turns out that this section (below),
   doesn’t like when values are the same. In my case ‘Music’ was causing an issue.
 *     ```
       register_taxonomy( 'albums', 'music',
       		array(
                    'hierarchical' => true,
       			 'label' => __('Music'),
       			 'query_var' => 'music',
       			 'rewrite' => array('slug' => 'music' )
       		)
       	);
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Custom Permalink Issue’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [flashpunk](https://wordpress.org/support/users/flashpunk/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/custom-permalink-issue/#post-1741203)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
