Make WordPress Core

Opened 8 years ago

Closed 4 years ago

#39685 closed defect (bug) (fixed)

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

Reported by: dimitrism's profile dimitris.m Owned by: ianbelanger's profile ianbelanger
Milestone: 5.5 Priority: normal
Severity: normal Version: 4.7.1
Component: Bundled Theme Keywords: has-screenshots has-patch
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 6 years ago.
Twenty Seventeen - front page editor
Twenty-Seventeen-About-Editor.png (81.2 KB) - added by laurelfulford 6 years ago.
Twenty Seventeen - About Page editor
Twenty-Seventeen-front-page.png (65.8 KB) - added by laurelfulford 6 years ago.
Twenty Seventeen - both the front page and about page content appearing on the front page
39685.patch (464 bytes) - added by poena 5 years ago.
Adds wp_link_pages to content-front-page.php
pagination-with-patch.png (61.0 KB) - added by poena 5 years ago.
Sample page with page break, set as homepage.
39685.1.diff (1.3 KB) - added by ianbelanger 4 years ago.
Updates patch to work in content-front-page.php and content-front-page-panels.php
page1.png (79.5 KB) - added by samful 4 years ago.
page2.png (99.2 KB) - added by samful 4 years ago.

Download all attachments as: .zip

Change History (18)

#1 @SergeyBiryukov
8 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
6 years ago

Twenty Seventeen - front page editor

@laurelfulford
6 years ago

Twenty Seventeen - About Page editor

@laurelfulford
6 years ago

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

#2 @laurelfulford
6 years 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
5 years ago

Adds wp_link_pages to content-front-page.php

#3 @poena
5 years ago

  • Keywords has-patch added; needs-patch removed

@poena
5 years ago

Sample page with page break, set as homepage.

@ianbelanger
4 years ago

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

#4 @ianbelanger
4 years 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 years ago

  • Milestone changed from Future Release to 5.5

#6 @samful
4 years 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 4 years ago by samful (previous) (diff)

@samful
4 years ago

@samful
4 years ago

#7 @ianbelanger
4 years ago

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

Reviewing for commit.

#8 @ianbelanger
4 years 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
4 years 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.

#10 @desrosj
4 years ago

  • Keywords fixed-major removed
  • Milestone changed from 5.4.3 to 5.5
  • Resolution set to fixed
  • Status changed from reopened to closed

With 5.5 just under 5 weeks away, there is no 5.4.3 planned. Moving back to the 5.5 milestone.

Note: See TracTickets for help on using tickets.