Hi, I've a couple of taxonomy archives with pagination. I've set 8 results per page, but it doesn't work.
The value is overridden by Astra Theme Customizing>Blog / Archive>Post Per Page setting.
It is a problem if I want to display a different number of result for the blog or other taxonomies.
Can you check it here:
/discover/antiquities-prehistoric-sites/
/wp-admin/admin.php?page=view-archives-editor&view_id=412
thanks
Umberto
Hi Umberto
It appears Astra applies its pagination settings later than Toolset, thereby overriding them.
You will need to use code to disable the application of the Astra setting on the archives that you specify.
Here's a simple example to dis-apply the Astra settings on the 'event' post type archive:
/**
* Remove Astra archive pagination setting for specified archive
*/
add_action( 'parse_tax_query', 'ts_mod_archive_pagination', 1, 1 );
function ts_mod_archive_pagination( $query ){
if ( ! is_admin() && $query->is_main_query() ) {
// Check if it is the archive page for the 'event' post type
if ( $query->is_post_type_archive( 'event' ) ) {
remove_action( 'parse_tax_query', 'astra_blog_post_per_page', 10, 1 );
}
}
}
You'll need to modify that to test for the particular archives this should apply to.