diff --git a/app/View/Composers/Post.php b/app/View/Composers/Post.php index 0d3987918b..5bcef38428 100644 --- a/app/View/Composers/Post.php +++ b/app/View/Composers/Post.php @@ -26,11 +26,12 @@ public function override() { return [ 'title' => $this->title(), + 'pagination' => $this->pagination(), ]; } /** - * Returns the post title. + * Retrieve the post title. * * @return string */ @@ -66,4 +67,18 @@ public function title() return get_the_title(); } + + /** + * Retrieve the pagination links. + * + * @return string + */ + public function pagination() + { + return wp_link_pages([ + 'echo' => 0, + 'before' => '

' . __('Pages:', 'sage'), + 'after' => '

', + ]); + } } diff --git a/resources/views/partials/content-page.blade.php b/resources/views/partials/content-page.blade.php index 5d4d20430d..5d394ebd8d 100644 --- a/resources/views/partials/content-page.blade.php +++ b/resources/views/partials/content-page.blade.php @@ -1,3 +1,7 @@ @php(the_content()) -{!! wp_link_pages(['echo' => 0, 'before' => '']) !!} +@if ($pagination) + +@endif diff --git a/resources/views/partials/content-single.blade.php b/resources/views/partials/content-single.blade.php index 76cce86aba..bb7b8a9aed 100644 --- a/resources/views/partials/content-single.blade.php +++ b/resources/views/partials/content-single.blade.php @@ -11,9 +11,13 @@ @php(the_content()) - + @if ($pagination) + + @endif @php(comments_template())