I just want to chime in and report that I have the same problem: When the Facebook plugin is enabled, pagination of the home page does not work because the request gets redirected to the canonical URL. When the plugin is disabled, pagination works as expected.
Reproduced it on a local test system and used the “Debug wp_redirect” plugin to show where the redirection happens:
Calling https://<IP>/page/2
in the browser redirects to https://<IP>
Debug WP Redirect
Location: https://192.168.2.200/
Status: 301
Backtrace:
Function: redirect_canonical
Arguments:
array(1) {
[0]=>
&string(0) ""
}
File: /var/www/sokrates/htdocs/wp-includes/plugin.php
Line: #403
Function: call_user_func_array
Arguments:
array(2) {
[0]=>
&string(18) "redirect_canonical"
[1]=>
&array(1) {
[0]=>
string(0) ""
}
}
File: /var/www/sokrates/htdocs/wp-includes/template-loader.php
Line: #7
Function: do_action
Arguments:
array(1) {
[0]=>
&string(17) "template_redirect"
}
File: /var/www/sokrates/htdocs/wp-blog-header.php
Line: #16
Function: require_once
Arguments:
array(1) {
[0]=>
string(56) "/var/www/sokrates/htdocs/wp-includes/template-loader.php"
}
File: /var/www/sokrates/htdocs/index.php
Line: #17
Function: require
Arguments:
array(1) {
[0]=>
string(43) "/var/www/sokrates/htdocs/wp-blog-header.php"
}
The theme I use is called “Gridlocked“. This seems to be the relevant part in the template:
<?php
if ( get_query_var('paged') ) { $paged = get_query_var('paged'); }
elseif ( get_query_var('page') ) { $paged = get_query_var('page'); }
else { $paged = 1; }
query_posts( array( 'post_type' => 'portfolio',
'paged' => $paged) );
?>
Any hints on how to solve that problem? On my live site (https://caniget.it), I currently “solved” this by increasing the number of entries that are shown on the home page to avoid pagination at all…