vendredi 11 avril 2014

facebook pagination wordpress problem

best sol is :

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., but it is somehow always redirected to your home page.


This handy snippet should do a trick. Make sure it is included somewhere in thefunctions.php file of your theme.
/* Fix pagination issue caused by Facebook plugin */

function meks_fb_plugin_pagination_fix() {

  //Check if plugin is activated and if we are on the homepage
  if(class_exists('Facebook_Loader') && is_front_page()){
    global $wp_query;
    $page = get_query_var('page');
    $paged = get_query_var('paged');

    //Check if we are trying to reach pagination link
    if($page > 1 || $paged > 1){



add_action( 'wp', 'meks_fb_plugin_pagination_fix', 99 );

Aucun commentaire:

Enregistrer un commentaire

Nombre total de pages vues