You can change the permalink setting to /p%post_id%
, but this will also set the front
property of the WP_Rewrite
object to /p
, so some URLs will also get this in front (/pauthor
for example). You can counter this by changing the $wp_rewrite->front
property again:
add_action( 'permalink_structure_changed', 'wpse5595_rewrite_front_reset' );
add_action( 'init', 'wpse5595_rewrite_front_reset' );
function wpse5595_rewrite_front_reset()
{
$GLOBALS['wp_rewrite']->front="https://wordpress.stackexchange.com/";
}
You must do this on every init
so the generated links are OK, and on every permalink_structure_changed
so the generated rules (that handle incoming URLs) are OK.
Comments on separate pages should be possible. I suggest you first try to find a plugin that does this, then we can figure out how to change the URL structure it uses.
Related Posts:
- How to Check if a Page Exists by URL?
- Linking comments from registered users to their profile pages
- How to get the post id from a permalink?
- How to allow slashes in single posts when i click in the edit permalink button
- How is WordPress manipulating the posts like there are folders?
- WordPress not opening posts with only numbers if permalink is post_name
- Permalink doesn’t get displayed in Twitter button (Local WordPress problem?)
- Retrieve post ID from “querying” URL
- How to remove the number of a comment in the url slug?
- Post is blank when I click on the link
- Can Permalink structure of %postname%/%post_id% improve performance
- Problem in getting user comments permalinks
- Crossposting from WP to Blogger with comments
- Why the internal link get converted into a comment?
- Oops! That page can’t be found
- Can I show category name in url for only one of my categories?
- Permalink Short code showing unnecessary link text inside the loop
- How can I make a post sub link?
- Does having category name in permalinks affect SEO when having a post in multiple categories?
- How to add a ‘News’ section to specific posts in WordPress
- Prevent Archive URLs
- Category URL to use same string as Post URL Permalink
- How do I generate formatted permalinks as specified in backend options?
- Post & Category Archives URL structure
- How to change post template via url?
- How to hide the login / profile urls on top of comment box for a post
- Default post type doesn’t display in url
- Blog posts are not appearing as subs of Blog Page
- How to add paraent in Blog post URL in wordpress
- Change permalinks for posts but not for custom post types
- How to use relative links on my pages?
- Reverse comment pagination numbers
- URL Rewrite + Page + Custom Post Type = Unusual Redirect
- WordPress on a subdirectory of Laravel – WordPress pretty permalinks inner page shows laravel
- get recent comments of a particular category
- Whitelisting Commenters
- WP_Comment_Query() displays “password protected” comments?
- Change slug with custom field
- Is it possible to move a comment that should be a reply to another comment?
- Can I seperate comments from post?
- How can I allow editors to leave comments on posts that have not yet been published?
- Making a Comment on a page without being on that page?
- Display commenter’s registration date on comments?
- permalink for category pages and posts
- How do I display the commentor’s first name and last name in the comments?
- What is the server IP comment hack
- How to add consent checkbox in comment section
- Do I have to have a nonce for a custom comment field?
- Get last seen date/time in wordpress get_comments() [closed]
- WP 4.4.1 allow empty comments via add_action ‘pre_comment_on_post’
- Share comment to twitter after publishing [closed]
- Hide notifications regarding new comments
- Are there any “YouTube-styled” commenting systems for WordPress?
- Change blog segment of URL
- Add filter to comments loop?
- Show comments to unregistered users
- How to bulk edit image url in featured image and product description?
- After database migration, posts not showing up in dashboard
- Adding character count and limit in comments, modifying labels and fields – jetpack
- Create custom permalinks to show Custom Post Type’s relationship?
- Change id=”respond” to the comments container
- Comments on Author page
- Woocommerce comments subscription [closed]
- How to implement a different permalink structure for custom post type?
- Two URLs of one post is available
- Advanced Custom Fields comments [closed]
- How to wrap comment_form $fields in one div?
- Two textareas showing up in comments.php
- how should the comment form really work?
- create separate page template for wordpress comments
- How to filter comments by comment_meta
- Adding /blog in front of single posts (only)
- Prevent users to delete comments from trash
- How can I hide comment of the authors from their published posts?
- How to customize ‘children comments’ in WordPress?
- add all blog posts to folder
- How to display replies to his comments in user profile of current user
- Top rated posts Average rating issue
- Get WordPress username to customize url
- stop url changing when user comments
- Keep comment author’s name on their comment even when their account is deleted
- How to add a class to comment submit button?
- WordPress Commenting System User access and Security
- Comments.php is not getting called on main blog page
- Post as frontpage – avoid duplicate content
- Custom post type with parent page? Possible?
- WordPress Comments – Only show part of user name
- Is there a way to change the complete URL of the blog post for a redirecting tracking link?
- WordPress with static posts page and custom permalink structure doesn’t find posts with numeric permalinks
- Broken comments section – WordPress 2014 Theme
- My posts section for logged in user
- Replace do_action() with a normal submit form in comments.php
- How to display a certain template element only for posts published within certain time range?
- Permalink remain the same on each page
- Removing parent page in URL for one page
- Comments on pages not appearing, even though I enabled them
- Stop future commenting on specific post
- Error 403 when posting comments to a custom post type from a different page
- Customize the new comment notifications sent to the post author after the comment is approved
- Get approved comments or comments that the author is me