WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 2 weeks ago

#39685 reopened defect (bug)

Twenty Seventeen: Pagination links don't appear for home pages

Reported by: dimitris.m Owned by: ianbelanger
Milestone: 5.4.3 Priority: normal
Severity: normal Version: 4.7.1
Component: Bundled Theme Keywords: has-screenshots has-patch fixed-major
Focuses: ui Cc:

Description

Steps to reproduce:

  • Create a new page and split its content with <!--nextpage-->
  • Set this page to be your Home one (under Settings/Reading)
  • Visit the page in the front-end

The Pagination links aren't shown at all in the bottom of the page.

This works if the page isn't set for Home and also works with the "TwentySixteen" theme.

Attachments (8)

Twenty-Seventeen-Front-Page-Editor.png (72.3 KB) - added by laurelfulford 18 months ago.
Twenty Seventeen - front page editor
Twenty-Seventeen-About-Editor.png (81.2 KB) - added by laurelfulford 18 months ago.
Twenty Seventeen - About Page editor
Twenty-Seventeen-front-page.png (65.8 KB) - added by laurelfulford 18 months ago.
Twenty Seventeen - both the front page and about page content appearing on the front page
39685.patch (464 bytes) - added by poena 11 months ago.
Adds wp_link_pages to content-front-page.php
pagination-with-patch.png (61.0 KB) - added by poena 11 months ago.
Sample page with page break, set as homepage.
39685.1.diff (1.3 KB) - added by ianbelanger 4 months ago.
Updates patch to work in content-front-page.php and content-front-page-panels.php
page1.png (79.5 KB) - added by samful 3 weeks ago.
page2.png (99.2 KB) - added by samful 3 weeks ago.

Download all attachments as: .zip

Change History (17)

#1 @SergeyBiryukov
3 years ago

  • Component changed from Themes to Bundled Theme
  • Summary changed from Pagination links don't appear for home Pages in "TwentySeventeen" to Twenty Seventeen: Pagination links don't appear for home pages

@laurelfulford
18 months ago

Twenty Seventeen - front page editor

@laurelfulford
18 months ago

Twenty Seventeen - About Page editor

@laurelfulford
18 months ago

Twenty Seventeen - both the front page and about page content appearing on the front page

#2 @laurelfulford
18 months ago

  • Keywords needs-patch has-screenshots added
  • Milestone changed from Awaiting Review to Future Release

Thanks for reporting this, @dimitris.m!

I can recreate this as well, both by trying to add a page break to the front page's content, and trying to add a page break to one of the pages showing on the front page.

This happens with both the classic and block-based editor.

@poena
11 months ago

Adds wp_link_pages to content-front-page.php

#3 @poena
11 months ago

  • Keywords has-patch added; needs-patch removed

@poena
11 months ago

Sample page with page break, set as homepage.

@ianbelanger
4 months ago

Updates patch to work in content-front-page.php and content-front-page-panels.php

#4 @ianbelanger
4 months ago

  • Keywords needs-testing dev-feedback added

I updated the patch so that pagination will work on the homepage and in the homepage panels. Would love to get some feedback from other devs on this one.

#5 @ianbelanger
4 months ago

  • Milestone changed from Future Release to 5.5

#6 @samful
3 weeks ago

Looking at themes TwentyNineteen and TwentyTwenty, this is exactly how they handle this, so I don’t see any issues with this patch.

I can also confirm that @poena’s patch fixed the home page and @ianbelanger’s patch improved on this to add the fix to the Front Page Sections (these are the sections used in Customise->Theme Options).

Something interesting I noticed was that, if you have 2 pages on the home page and go to the 2nd page of the homepage, the other pages listed (via Customise->Theme Options) on the home screen will also go to the 2nd page.

For example, I have the "home" page as the WordPress Home page and the "sample page" as the Front page section 1, if I click on page 2 of the page called "home", the "sample page" will go to the 2nd page also (because every page on the homepage will go to page 2). I'm not sure how likely this will be, or what can be done about this, but I thought I'd mention it anyway... I'll add screenshots for clarity.

Last edited 3 weeks ago by samful (previous) (diff)

@samful
3 weeks ago

@samful
3 weeks ago

#7 @ianbelanger
2 weeks ago

  • Keywords commit added; needs-testing dev-feedback removed
  • Owner set to ianbelanger
  • Status changed from new to reviewing

Reviewing for commit.

#8 @ianbelanger
2 weeks ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 48064:

Bundled Themes: Twenty Seventeen pagination links don't appear for home pages.

Fixes issues where pagination does not work on the page that is set to the home page.

Props dimitris.m, laurelfulford, poena, ianbelanger, samful.
Fixes #39685.

#9 @ianbelanger
2 weeks ago

  • Keywords fixed-major added; commit removed
  • Milestone changed from 5.5 to 5.4.3
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for backport.

Note: See TracTickets for help on using tickets.