Easier way would be to use a $_GET parameter (which don’t change the autogenerated canonical address wordpress uses) and the content_pagination filter like this:
add_filter( 'content_pagination', function($pages){
if ( in_the_loop() && (isset($_GET['onepage']) ){
$pages = [ join( '', $pages ) ];
}
return $pages;
} );
Happy Coding.
Related Posts:
- How do I check if I linked to a post before I delete it?
- How to check if post meta key exists or not in wordpress database
- Custom Post Types, slug, archive and SEO plugins
- Portable Post Links
- Related Posts by Multiple Tags?
- Action hook ‘wp’ firing twice… why?
- Dynamically update post title in admin page
- How can I display 7 posts on the home page, but 9 posts on the subsequent pages?
- WP REST API, query total posts in a category
- duplicate posts when trying to update a post using the wp_insert_post.
- Add custom field to all posts in specific category
- 404 error after publishing a post
- How to remove_filter that filters iframes in posts? [duplicate]
- Hiding by default specific post status on backend list?
- How to edit layout of a particular post format?
- Displaying Page Title on index.php
- Detect Post Type when publish_post is ran
- Showing Thumbnail from Previous and Next Posts
- WP_Query in functions.php overrides global $post object, even with wp_reset_query()
- How to automate filing a form as a user
- WP rest api returns 404 only when author param is used
- What Is meta_id In wp_postmeta?
- the_posts filter been called multiple time
- Reset/Reorder posts ID in the MySQL wp_posts table
- Encrypt / Decrypt Post Title and Details
- Limiting the number of posts in WP_Query leads to unexpected result
- how to set beforsend option in wordpress ajax methods
- Prepend or add an Image to the content of a Post
- Guest Author – How to display posts on /author/ archive page
- How to add pagination in between post and comments?
- Posts not showing on page
- Select a specific post to display in a news box
- Redirection not working in this front end post submission form?
- Add Word Limit to Posts
- Having trouble with the_post_thumbnail to display thumbnail with custom size
- How to Programmatically add an empty Block to every post on wordpress site?
- Pulling in post category and children within category
- get query() without post content?
- Getting value from get_post_custom
- posts_per_page option limits the number of Gallery items
- show custom post type category dropdown sorting result on same page
- How to exclude visited posts from loop
- how can i allow users to view their own pending posts in a front-end page
- Get posts and include taxonomy term
- Number of displayed posts
- Add custom text automatically on each post
- What date to use as a post date? date_gmt or modified_date_gmt
- Display current post position in Elementor Posts widget
- singular posts using archive styling
- My Custom Post Type Still Using index.php
- Un-highlight Blog Menu Item when Category Menu Item is Selected
- How to get the form code from the edit page of a specific post?
- Send email for pending post
- Get the post id from a plugin
- get_posts not pulling the correct number of posts
- change the post time on multiple posts
- If custom field is empty, use one from a previous post
- Making posts permalinks consistent numbers
- How to show category based post in home page?
- I can’t find the relevant part of the loop in my theme file. How do I find the full content with “More…”
- Locally change the font family [closed]
- WordPress single.php different layouts projects / posts
- WordPress Post via e-mail writes a random string for the post body
- YARPP php question
- Classic Button in Classic editor
- Export post another site
- Css and function issue on author archive page
- How to show post views shortcode data for each post on Posts List Page?
- Need to display a Jan 1st post as the site’s front page on Jan 1st, and Jan 2nd post as front page on Jan 2nd etc
- Related Customs posts
- How to add a ‘News’ section to specific posts in WordPress
- Get post attachment with post id
- I have two post types in the same query, how can I use CSS to select only one post type?
- Add Categories To Custom Post
- Display post on main page with thumbnail
- Redirecting user to a page when there is no content?
- Display Posts by Categories
- How can I alternate styling of images in a post? [closed]
- Custom Single Post Type not referring to single-post-type.php File
- Display iframe or embeded posts on homepage
- Custom template for different post types
- index.php is only displaying current month’s posts?
- How can I use the “Your latest posts” as a template?
- Query to get data of a post, if in category?
- Order posts by custom field
- prevent same wordpress post title
- Remove duplicated posts in the loop if post has more than one category
- “Current” class on a singular page menu item with custom post types?
- Continuous listing from a custom field
- get next/previous post name
- Add class name of content, Hypernate doesn’t work to IE and Chrome
- Get image paths from RSS feeds
- How do I display the next 3 posts in the sidebar?
- 2 tick boxes appearing below comments
- How can to use the players from the Media Widgets in the body of a post to play audio and video files
- Issue with wordpress pagination: last 2 posts show again on second page
- Extra Theme – Fit image inside of Featured Post Slider
- Polylang – display one post into 3 categories with different lang [closed]
- How can I show the positive and negative comments for a same post separately?
- Trying to create parent for post. I need some help. Thanks