Fix shortcode page var
This commit is contained in:
parent
66fe10b580
commit
ef4a8cd430
@ -1496,7 +1496,7 @@ function fictioneer_shortcode_article_cards( $attr ) {
|
||||
'author' => $attr['author'] ?? false,
|
||||
'order' => $attr['order'] ?? 'DESC',
|
||||
'orderby' => $attr['orderby'] ?? 'date',
|
||||
'page' => get_query_var( 'page' ) ?? get_query_var( 'paged' ) ?? 1,
|
||||
'page' => max( 1, get_query_var( 'page' ) ?: get_query_var( 'paged' ) ),
|
||||
'posts_per_page' => $attr['per_page'] ?? get_option( 'posts_per_page' ),
|
||||
'post_ids' => fictioneer_explode_list( $attr['post_ids'] ?? '' ),
|
||||
'author_ids' => fictioneer_explode_list( $attr['author_ids'] ?? '' ),
|
||||
|
@ -53,7 +53,7 @@ if ( $args['count'] > 0 ) {
|
||||
$query_args['posts_per_page'] = $args['count'];
|
||||
$query_args['no_found_rows'] = true;
|
||||
} else {
|
||||
$query_args['paged'] = max( 1, $args['page'] );
|
||||
$query_args['paged'] = $args['page'];
|
||||
$query_args['posts_per_page'] = $args['posts_per_page'];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user