Well, you can turn it off completely or use the following code along with some sort of conditional statement to switch it on or off.
The multipage part is set up in the setup_postdata()
function in wp-includes/query.php
. There’s an action at the end of the function called the_post
.
If you hook onto that and then modify the globals that are set up in the function you can undo the multipage config:
add_action( 'the_post', function( $post ) {
global $pages, $numpages, $multipage;
$pages = array( implode( '', $pages ) );
$numpages = 1;
$multipage = 0;
} );
Add that to your functions.php or plugin and you’re good to go.
Related Posts:
- Creating a custom category page with pagination
- How to remove wp_link_pages() from template
- Unable to display pagination links on custom category template
- Get URL of current post but not the page number
- Pagination issue with tag.php
- Give wp link pages it’s own template
- Can index.php take over for front-page.php in template hierarchy on second page?
- Pagination problem (plugin wp-pagenavi) with a custom post type?
- template with multiple post loops for multiple widgets [duplicate]
- Add pagination to blog
- Custom template pagination
- How do I get the size of an attachment file?
- How to get slug of current category in taxonomy template?
- Using WordPress templating for HTML emails
- I put my blog on a subpage, how do I get page title?
- Outputting Canonical Resource URLs Across a Multisite Network?
- Restrict a search to a custom post type
- Test if page is child and has children, if so echo child pages also on grandchild pages
- How did you incorporate WooCommerce in your own WordPress theme?
- Correct process for a new Page Template?
- Templates & CSS – Proper Programming Practice?
- A shared custom taxonomy between two custom post types
- Custom Page Template for “Older Posts” Pages
- New Template — copy existing template and change code? [duplicate]
- Same template for all the terms of a taxonomy
- Modifying searchform.php and search.php to have two kinds of searches
- Create a WordPress template without navigation and footer
- Template redirect is_tax() not working
- Hide Front-End Admin Bar Including 32 px Spacing
- Passing variables to template parts
- Show template loaded
- How can I make my custom templates respect permissions?
- How to format shortcode’s HTML in external file
- How to replace WordPress sidebars (widget areas) with Gutenberg
- Unable to include a template
- Turning on the 404 page on localhost
- Checking for page templates in child theme
- Is there an action hook that fires just before a template is loaded?
- post edit button on front end
- What’s the equivalent of front-page.php for a custom static page?
- Stylesheet comment header: Which header names are mandatory? [duplicate]
- How to add posts list to a page template?
- Valid HTML in Template Part
- Why do I get the same excerpt for all items in my RSS feed?
- What is this code trying to do? It was the cause of my 20s TTFB
- get_post_metadata() undefined when used in loop in RSS template
- the_excerpt producing empty output
- Problem when linking out to separate file within foreach loop
- Conditional tags or Multiple files
- Getting term description in single post template
- Is there a way I can put my post templates in a separate folder?
- new page sidebar-template by default
- Get link to a specific template file [closed]
- Include Custom Style & Script into Custom Post Type Single Template
- Standard WordPress Search does not work / Search-results are not displayed / Custom template
- The default code for “posts_nav_link” on category.php isn’t working
- How to preserve changes in templates and other files
- Whats the template of my homepage?
- Custom headers based on taxonomies
- Override Dokan Includes File in Child Theme
- How to get link to homepage
- How is WooCommerce cart.php template supposed to be used?
- Two exact templates, sidebar showing in one but not the other
- Taxonomy term page going to 404
- How can I use default CPT templates from sub-folder?
- How to set page title tag in custom template for non-Custom Post Type?
- Page header on specific page is different from the rest [closed]
- Can a link in WordPress contain a query string that is picked up as $_POST
- Is it possible to access plugin data from a custom feed template?
- How can I get all archive-URLs to use the same template?
- Automate configuration after new/hosted installation
- Modify just ONE page based on a template
- which template does wp_ tag_ cloud point to?
- Add an anchor link to a ‘plain’ HTML file, without over-writing the entire site?
- Template part including not working
- Parent/Child themes – both CSS files loaded
- How to implement pagination in category.php template
- front-page.php includes a placeholder text field. How to get rid of it?
- Display a custom 404 page without a redirect
- Template and URL parameter problem
- get_users by role returns all users
- Display Both next previous and number in single page [duplicate]
- Validating Error with submit button
- How can I alter a post?
- What is the purpose of the $before and $after arguments on the the_title() function?
- Remove ” Browse Category : ” from Archive title
- Test for if you’re on 1st page of paginated post (with nextpage quicktag)
- When to use content-pagename.php?
- Using external file with WP_USE_THEMES set to false causing 404
- How to install a wordpress website template on an existing website?
- Why is my no-results.php template moving my sidebar and footer into the main container?
- Any way to insert text on page from a query results?
- Modifying Page-Links format
- Show page title just from the first child-page in template
- How to know which page/file WordPress is expecting?
- AJAX requests within templates
- Page.php vs Single.php
- Single post pagination
- templates page not showing on gutenberg editor
- How to load php templates from html page (block theme)