New Better Permalink
|Reported by:||imshashank||Owned by:||imshashank|
Better Permalink Strucuture
Index: options-permalink.php =================================================================== --- options-permalink.php (revision 20111) +++ options-permalink.php (working copy) @@ -187,6 +187,7 @@ 2 => $prefix . '/%year%/%monthnum%/%postname%/', 3 => $prefix . '/' . _x( 'archives', 'sample permalink base' ) . '/%post_id%', 4 => $prefix . '/%postname%/', + 5 => $prefix . '/%category%/%postname%/%post_id%/', ); ?> <h3><?php _e('Common Settings'); ?></h3> @@ -212,6 +213,10 @@ <td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td> </tr> <tr> + <th><label><input name="selection" type="radio" value="<?php echo esc_attr($structures); ?>" class="tog" <?php checked($structures, $permalink_structure); ?> /> <?php _e('Category Post Name ID'); ?></label></th> + <td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' .$category_base . _x( 'sample-post', 'sample permalink structure' ).'/123'; ?></code></td> + </tr> + <tr> <th> <label><input name="selection" id="custom_selection" type="radio" value="custom" class="tog" <?php checked( !in_array($permalink_structure, $structures) ); ?> /> <?php _e('Custom Structure'); ?>
#1. The URL structure is SEO-friendly and also looks clean in snippets that are displayed in search engine results pages.
#2. The structure doesn’t contain dates. I generally try to write “timeless” blog posts that should stay relevant for a longer period of time and hence skipped the date completely from the URL – the date is anyway displayed in blog articles and sometimes even in search snippets as in the above screenshot.
#3. Google News includes quite a few multi-author blogs in their index and one of their technical requirements says that all article URLs must contain a unique number. If in future, this blog grows and gets included into Google News, I won’t have to alter the permalink structure because there’s a unique number already in the URL – it’s called Post ID.
#4. Words in the URL are separated by hyphens and not underscores as suggested by Matt Cutts in one of the WordPress camps.
Suggested by Amit Agarwal of labnol.org
Change History (7)
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
comment:2 imshashank — 2 years ago
- Resolution wontfix deleted
- Status changed from closed to reopened
comment:5 imshashank — 2 years ago
- Owner changed from Shashank Agarwal to imshashank
- Status changed from reopened to accepted