View multipage post in a single page
-
I have a few posts which have multipage enabled. Thus, shows one post broken to various pages, which is what I need. But, I also want to give an option of reading the full article in a single page.
I tried addingglobal $multipage
outside the loop and then added$multipage = false;
inside the loop. But, the post is still displays in multiple pages. Is there a way to allow an option the whole post to show up on one page only? I am trying to add the option by creating a link at the bottom of the page which adds?multipage=false
and using $_GET to check and set the $multipage value.
So, the relevant part of my code looks like<?php global $multipage; if ( have_posts() ) : while ( have_posts() ) : the_post(); if ($_GET['multipage']=false) { $multipage = false; } the_content(); endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘View multipage post in a single page’ is closed to new replies.