Opened 13 years ago
Closed 13 years ago
#20172 closed enhancement (wontfix)
New Better Permalink
Reported by: | imshashank | Owned by: | imshashank |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.4 |
Component: | General | Keywords: | has-patch close |
Focuses: | Cc: |
Description
Better Permalink Strucuture
/%category%/%postname%/%post_id%/
The Patch->
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[5]); ?>" class="tog" <?php checked($structures[5], $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
Attachments (1)
Change History (7)
#1
@
13 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
Users are free to enter any permalink structure they want, including the one you mentioned. We don't need more examples on the admin page.
#2
@
13 years ago
- Resolution wontfix deleted
- Status changed from closed to reopened
There are already examples on the permalink page:
Day and name http://localhost/wordpress/2012/03/04/sample-post/
Month and name http://localhost/wordpress/2012/03/sample-post/
Numeric http://localhost/wordpress/archives/123
Post name http://localhost/wordpress/sample-post/
So there is no harm in entering a better permalink option... and only advance users know hoe to use this...
#3
@
13 years ago
- Keywords close added
Better is relative.
and only advance users know hoe to use this...
Everyone should be able to follow the link from the description =>
http://codex.wordpress.org/Using_Permalinks#Structure_Tags
#4
@
13 years ago
There are already examples on the permalink page
Ok, and when do we stop? Is 5 examples too much? How about 10?
Permalink Patch