Opened 15 years ago
Closed 15 years ago
#17308 closed defect (bug) (fixed)
In order to use a tag_base as-is, category_base needs to be set
| Reported by: | markjaquith | Owned by: | markjaquith |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.2 |
| Component: | Taxonomy | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
In order to have a tag_base be used without with_front, you have to set category_base, due to what appears to be a copy/paste error:
register_taxonomy( 'category', 'post', array(
'hierarchical' => true,
'update_count_callback' => '_update_post_term_count',
'query_var' => 'category_name',
'rewrite' => did_action( 'init' ) ? array(
'hierarchical' => true,
'slug' => get_option('category_base') ? get_option('category_base') : 'category',
'with_front' => ( get_option('category_base') && ! $wp_rewrite->using_index_permalinks() ) ? false : true ) : false,
'public' => true,
'show_ui' => true,
'_builtin' => true,
) );
register_taxonomy( 'post_tag', 'post', array(
'hierarchical' => false,
'update_count_callback' => '_update_post_term_count',
'query_var' => 'tag',
'rewrite' => did_action( 'init' ) ? array(
'slug' => get_option('tag_base') ? get_option('tag_base') : 'tag',
'with_front' => ( get_option('category_base') && ! $wp_rewrite->using_index_permalinks() ) ? false : true ) : false,
'public' => true,
'show_ui' => true,
'_builtin' => true,
) );
Expected: it goes off the presence of a tag_base for tags.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In [17789]: