jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Related Posts appears above article pagination

Open johnkawakami opened this issue 8 years ago • 3 comments

Steps to reproduce the issue

This applies to twentyfifteen. Use the <!--nextpage--> tag within an article, and the article pagination appears.

However, it looks weird, because the Related Posts display above the pagination.

What I expected

I expected the Related Posts to be below the pagination.

What happened instead

screenshot from 2018-02-18 01-13-40

Suggested change

Instead of using the_content filter, use wp_link_pages.

Old code in jetpack-related-posts.php:

            add_filter( 'the_content', array( $this, 'filter_add_target_to_dom' ), 40 );

New code:

            add_filter( 'wp_link_pages', array( $this, 'filter_add_target_to_dom' ), 40 );

screenshot from 2018-02-18 01-33-45

I don't know the implications of this change. It seems to work on both the paginated and single-page articles, in the twentyfifteen theme.

johnkawakami avatar Feb 18 '18 09:02 johnkawakami

This issue has been marked as stale. This happened because:

  • It has been inactive in the past 6 months.
  • It hasn’t been labeled `[Pri] Blocker`, `[Pri] High`.

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.

stale[bot] avatar Aug 18 '18 10:08 stale[bot]

The software was updated, and the pagination has moved to beneath the related posts, again.

johnkawakami avatar Aug 19 '18 06:08 johnkawakami

This is a common issue on WordPress, it will happen with all plugins that hook data (like related posts) to the post content. Luckily, there is a work-around so your pagination links can appear higher on the page. I detailed the work-around in this forum thread: https://wordpress.org/support/topic/page-numbers-above-share-this/#post-6999162

I hope this helps. Unfortunately that is not something we can change in Jetpack itself. I'll consequently close this issue.

jeherve avatar Sep 05 '18 11:09 jeherve