From 556e8d5152c107e1031606b1f8ac56a302e74881 Mon Sep 17 00:00:00 2001 From: Mohammad Jangda <batmoo@gmail.com> Date: Mon, 11 Feb 2013 17:19:27 -0500 Subject: [PATCH] Set $multipage to 0 when viewing all This way, wp_list_pages will not output next/previous pages. --- view-all-posts-pages.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/view-all-posts-pages.php b/view-all-posts-pages.php index 3c439f3..896483d 100644 --- a/view-all-posts-pages.php +++ b/view-all-posts-pages.php @@ -179,7 +179,7 @@ class view_all_posts_pages { */ public function action_the_post( $post ) { if ( $this->is_view_all() ) { - global $pages, $more; + global $pages, $more, $multipage; $post->post_content = str_replace( "\n<!--nextpage-->\n", "\n\n", $post->post_content ); $post->post_content = str_replace( "\n<!--nextpage-->", "\n", $post->post_content ); @@ -189,6 +189,7 @@ class view_all_posts_pages { $pages = array( $post->post_content ); $more = 1; + $multipage = 0; } } @@ -669,4 +670,4 @@ if ( ! function_exists( 'is_view_all' ) ) { return $vapp->is_view_all(); } } -?> \ No newline at end of file +?> -- GitLab