Meks
Do you know you can try any of our premium WordPress themes for free?Show me the themes
Fix WordPress pagination issue by Facebook plugin

Fix WordPress pagination issue by Facebook plugin

76Shares

Some time ago, several of our users complained that pagination on our themes is not working properly. Actually, we have found out that this is not theme related issue and it was caused only if Facebook WordPress plugin was installed and activated on their websites.

Since we were a bit worried about this because it is well known plugin, we have found out that many users or theme authors had the similar problem. And then we came up to solution with handy snippet which will prevent the issue.

When does pagination issue by Facebook WordPress plugin appears?

  • Only on homepage
  • If you are using “Post name” option in Permalink Settings
  • If you are using “Static” homepage option in your Reading Settings which means you are using some custom page template to display your posts in a default loop

The problem with this issue is that WordPress actually generates proper pagination link, (i.e. yourwebsite.com/page/2), but it is somehow always redirected to your home page.

Top Hosting recommended by Meks

Solution

This handy snippet should do a trick. Make sure it is included somewhere in the functions.php file of your theme.

That’s it! Feel free to try it out and let us know if it works for you!

76Shares
Bojan Petrovic

Co-founder and WordPress developer at Meks. He has been involved in the business since 2009. creating themes, plugins and services on top of WordPress, continuously aiming to choose best approaches and work smarter, not harder.

Try theme now for free!
  • Access to a copy of the demo website
  • Full access to the theme options
  • No credit card required

* We will send you an occasional newsletter with special offers, news & theme updates but you can unsubscribe at any time.

Meks