Make Google index the entire post if it is separated into several pages

The basic problem for a script solution is: rel_canonical does not offer any useful filter. So we have to replace that function: remove_action( ‘wp_head’, ‘rel_canonical’ ); add_action( ‘wp_head’, ‘t5_canonical_subpages’ ); The next problem: $GLOBALS[‘numpages’] is empty before setup_postdata(). We could call that function already here, but it might have side-effects. Here is a solution that … Read more