Skip Navigation

[Resolved] Archive template not correct pagination

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by Minesh 2 months, 3 weeks ago.

Assisted by: Minesh.

Author
Posts
#2681766
Screenshot_5.png

I am trying to: set 39 elements on archive

Link to a page where the issue can be seen: hidden link

I expected to see: 39 elements per page

Instead, I got: 10 elements

#2681802

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I see you are using cache plugin, In order to minimize the cause of the issue and to ensure there is not conflict between the theme/plugins you use:

Could you please try to resolve your issue by deactivating all third-party plugins as well as the default theme to check for any possible conflicts with any of the plugins or themes?
- Do you see any difference?

#2681807

I turned on only 2 Toolset plugs, but the problem remained. I disconnected the theme of Astra and the problem disappeared. That is, there is a certain conflict with the theme, although there is integration for it.

#2682056

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I confirm the issue and I've escalated it in front of our next level support. It seems compatibility issue so it may take longer then expected but there is no ETA on it when the fix made available.

Please hold on for further updates.

#2682217

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Here is the errata page where we mention the workaround that should help you to fix this issue:
=> https://toolset.com/errata/custom-archive-pagination-broken-by-astra-theme/

Can you please try to follow the instructions given with the above errata link and try to resolve your issue.

#2682826

Hello, Minesh, Its not work for taxonomy archive

#2682851

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please try to use the following hook that should help you to set the posts per page for custom taxonomy archive while using astra theme:

add_action( 'parse_tax_query', 'func_change_post_per_page_tax_astra',10,1 );
function func_change_post_per_page_tax_astra( $query ) {
	global $WP_Views;
	
	if ( is_admin() || ! $query->is_main_query() ) {
		return;
	}
	if ( function_exists( 'is_woocommerce' ) && is_woocommerce() ) {
		return;
	}
	
	/// add your custom taxonomy slugs here
	$tax_slugs = array('book-author');

	 if(is_tax($tax_slugs)){
		 $wpv_options = get_option("wpv_options");
		 
		 foreach($tax_slugs as $k=>$v):
		 
			 if(isset($wpv_options['view_taxonomy_loop_'.$v])){
				$tax_archive_id = $wpv_options['view_taxonomy_loop_'.$v];
				$archive_settings = get_post_meta($tax_archive_id,'_wpv_settings',true);
				$posts_per_page = $archive_settings['pagination']['posts_per_page'];
				$query->set( 'posts_per_page', $posts_per_page );
			
		 }
		
		 endforeach;
	
		 
	 }

}

Where:-
- adjust the $tax_slugs array values for your taxonomy archives you want.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.