WordPress version: 3.4.1
WordPress SEO version: 1.2.5
I did this:
In Yoast WordPress SEO: Titles & Metas, Post Types tab, I entered the following for the Title template:
%%title%% - Page %%pagenumber%% | %%sitename%%
I expected the plugin to do this:
I expected "Page %%pagenumber%%" to show "Page 1" for page one.
Instead it did this:
Instead, it shows "Page 0" for page one.
Also, if the "View All" link is clicked, "Page 0" is displayed.
The page numbering works if two lines are added in wp-content/plugins/wordpress-seo/inc/wpseo-functions.php in wpseo_replace_vars() at line 107 (I show between comments lines below):
$pagenum = 0;
$max_num_pages = 1;
if ( !is_single() )
{ $pagenum = get_query_var('paged');
if ($pagenum === 0)
$pagenum = 1;
if ( isset( $wp_query->max_num_pages ) && $wp_query->max_num_pages != '' && $wp_query->max_num_pages != 0 ) $max_num_pages = $wp_query->max_num_pages;
} else { $pagenum = get_query_var('page');
// ------------------------------------------------------------
// first page
if (($pagenum === 0) || ($pagenum == '')) $pagenum = 1;
// view all
if ($pagenum == '') $pagenum = ': View All';
// ------------------------------------------------------------
$max_num_pages = substr_count( $post->post_content, '<!--nextpage-->' );
if ( $max_num_pages >= 1 )
$max_num_pages++; }
We'd like to request a patch for this - thanks!