Now the question is why does WP only put the word “date” in when the permalink is “/%post_id%/%postname%/”?
Because the WP_Rewrite class method get_date_permastruct
only looks specifically for a clash between %date%
and %post_id%
tags.
To get this date structure with other numeric-based post permalink structures, you can manipulate the date structure directly:
function wpa57228_date_structure() {
global $wp_rewrite;
$wp_rewrite->date_structure = $wp_rewrite->front . 'date/%year%/%monthnum%/%day%';
}
add_action( 'init', 'wpa57228_date_structure' );
Related Posts:
- Archive permalinks
- Permalinks for WooCommerce Categories and Subcategories
- Rewrite url / permalink for default archive – yearly / monthly
- Change of permalink structure – redirects in htaccess breaks the archive links
- Custom permalink for search and pagination
- Programatically changing post’s permalink when identical post type is published
- Date Archives’ Permalinks under Category folder
- Can’t select blog month within archive category
- Advanced author permalinks
- Disable date based archives for all categories except one
- Path to Pages Resolves to Archive instead of Actual Content
- Change permalink structure for pagination only
- I Need to use Month , year in my all archives and pages of my wordpress site
- Strip subcategory base from URL
- archive by year and category: permalink support doesn’t work on pagination
- Customize URL for specific tags archive
- Permalinks – Archives
- WordPress Archives Cause Looping
- Permalink, links a page to the homepage
- Permalinks of archive tag wordpress
- WordPress archive posts returns user to homepage
- Post archive pages bringing me to a 404 page
- Strip category base from URL?
- Stop WordPress appending `-2` to the end of my url after i change it
- WordPress Permalinks not working in Apache2 Ubuntu 14.04
- Get current URL (permalink) without /page/{pagenum}/
- Removing the redirect after changing a page’s slug
- How to display a public profile page for registered users with custom slug?
- How does wordpress keep track of post id when post id is not used in permalinks?
- Permalink Issues by Installing WordPress in Subdirectory / Subfolder
- How to add query parameters to all internal links?
- How to make draft posts or posts in review accessible via full url / slug?
- nginx – permalinks with .php in url not working
- Social Media Links on homepage – within posts/post loop
- Custom rewrite rules for feeds of custom queries (query_var query strings in URL)?
- removed index.php now all pages 404
- Permalinks all messed up, I am helpless [closed]
- WordPress | Convert #038; to &
- permalink changed, now getting 404 for every pages
- How to write correct add_rewrite_rule in WordPress for more than one taxonomy in one rule?
- How to add category to the permalink and breadcrumb?
- Permalinks not working Apache + CentOS 7
- How can I link a file in admin with a button?
- Remove Dash/Hyphen From WordPress CustomPosttype Permalink
- Auto-create a pretty permalink for a bunch of posts
- wp_logout_url redirects to incorrect page because of pagination
- Get new WordPress slug from old wordpress slug
- Moved page (new parent) loads properly using obsolete URI. Why?
- Only default permalink is working mod_rewrite enabled
- Custom Permalinks for Posts only
- How to add a variable as a tag base?
- Why is page/2/ not working?
- Removing leading zeros from custom permalink structure
- Integrating wordpress into existing site and setting up htaccess?
- Permalinks stopped working – NO update, mod_rewrite enabled, .htaccess not touched
- Add more structure tag to permalink?
- wp_publish_post to saved draft, permalinks broken
- display dynamic content based on url slug on custom page
- How to generate a list of all urls
- Slugs Disappeared Leaving 404s – Quick way to repopulate?
- Permalink options page corrupts web.config file
- How to rename ‘Tag Base’ with WPeC 3.8?
- Permalink target for recent post
- Permalink Problems
- Make last three words of excerpt a link
- How do I reclaim either deleted pages or their permalinks?
- url rewrite .htaccess extension to permalink
- Permalink of a page that has already been deleted
- How to remove .html from admin
- Retrieve default permalink while using seo friendly URLs in WordPress
- WordPress Permalinks problem
- How to get rid of an extra middle part my permalink
- How Can I Use a Custom AccessFileName?
- xammp server permalink by postname not working
- Blogger To WordPress Permalink Redirection
- get_permalink() gives a certain page link only. how to solve this.?
- replacing post ID by custom post name in url
- Change type of permalinks on TinyMCE link dialogue
- Problem with special character WordPress
- Change pemalink for one single post without redirect
- How to change specific permalink in wordpress site?
- assets aren’t loading on a page but loads on others? slug permalink conflict?
- remove SLASH on single_post but KEEP on categories and parent pages
- Change Project permalink to custom URL
- Edit Post Permalink option removed, looking for possible causes
- Site Tagline ended up in permalink
- Got 404 error when changed siteurl via DB in WordPress
- Permalinks don’t update nor link properly
- get_permalink to an anchor
- Add URL to selected post in meta box
- Add Custom Pagination Permalink
- Prevent guessing slug
- Pretty permalinks to work for lighttpd webserver?
- Pages included in another page and duplicate content issues for SEO
- URL to an image in a post is changing when permalink is set to custom. Can I avoid this?
- Permalinks not working on MU network with domain mapping
- How can i edit all posts slug in bulk keeping WP native redirect?
- Blog url disappears
- Standard Htaccess directives disappear by themselves
- My permalinks no longer have the “news” category prefix in the link and it’s causing 404 errors for articles published on the web