For the benefit for those who need it, these are the solutions that I got through email from Jevuska (https://www.jevuska.com/). Many thanks to him!
To remove paging title from the first page of the paginated post, add to functions.php:
if ( class_exists( 'gregsHighPerformanceSEO' ) ) :
add_filter( 'pre_get_document_title', function( $title ) {
if ( is_single() && ( int ) 2 > get_query_var( 'page' ) )
return single_post_title( '', false ); //custom title
#return ''; //back to default post title
return $title;
} );
endif;
To remove paging Meta Description of the first page of the paginated posts, add to functions.php
/**
* Remove action from anonimous class name
* Credit https://github.com/herewithme/wp-filters-extras/blob/master/wp-filters-extras.php
* Build again meta description
*
*/
if ( class_exists( 'gregsHighPerformanceSEO' ) ) :
add_action( 'wp', function( $wp ) {
if ( isset( $wp->query_vars['page'] ) && ( int ) 2 > $wp->query_vars['page'] )
{
//remove plugin hook
global $wp_filter;
$hook_name = 'wp_head';
$priority = 2;
$class_name = 'gregsHighPerformanceSEO';
$method_name = 'head_desc';
if ( ! isset( $wp_filter[ $hook_name][ $priority ] ) || ! is_array( $wp_filter[ $hook_name ][$priority ] ) )
return false;
foreach( ( array ) $wp_filter[ $hook_name ][ $priority ] as $unique_id => $filter_array )
{
if ( isset( $filter_array['function'] ) && is_array( $filter_array['function'] ) ) {
if ( is_object( $filter_array['function'][0] ) && get_class( $filter_array['function'][0] ) && get_class( $filter_array['function'][0] ) == $class_name && $filter_array['function'][1] == $method_name )
{
unset( $wp_filter[ $hook_name ][ $priority ][ $unique_id ] );
}
}
}
return false;
}
} );
//build new meta description early
add_action( 'wp_head', function() {
if ( is_single() && ( int ) 2 > get_query_var( 'page' ) )
{
$gregsHighPerformanceSEO = new gregsHighPerformanceSEO;
echo $gregsHighPerformanceSEO->head_desc();
}
}, 2 );
endif;