Welcome to WebmasterWorld Guest from 54.163.42.154

Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

How to ajaxify WordPress <!--nextpage--> links ?

Ajaxify links generated by wp_links_pages() when using <!--nextpage-->

     
5:06 pm on Jan 1, 2018 (gmt 0)

New User

5+ Year Member

joined:Sept 26, 2012
posts: 18
votes: 3


When we use <!--nextpage--> to split a Post in WordPress into multiple pages, then at end of the Post page, depending on theme settings, there is "Next Page" "Previous Page" links/buttons.

Now this is great way to reduce bounce rate and increase page impressions and monetization on lengthy articles(or so I believe) but it perhaps isn't a great user experience.

I wanted to know of any plugin or code-hacks which can ajaxify those pagination links. So when user clicks Next Page/Previous Page links, a loading gear appears instead of entire page literally refreshing.

(If you have ever used "Customize theme" option and in the preview clicked any link, you will understand what I am saying. WordPress theme customizer doesn't refresh entire page rather it's ajaxified. I want to do the same for paginated Posts.)

Edit: By "ajaxifying" I do not literally mean that only a portion of page should change, that would make no sense as AdSense wouldn't work in that condition. I just want to show the reader a loading-gear icon on the screen and the next page should load in the background with some overlay effect maybe. This gives an illusion of fast page load.