Issue 1: I noticed that the category archive on my site is not sorting in the correct order. It used to work and I'm not sure when this happened.
Example of a category archive that isn't sorting correctly: /team-group/lighting-control-shades/ (see WP access info for full site URL)
Issue 2: In an attempt to investigate this, I went to edit the category archive and I get an error "This block has encountered an error and cannot be previewed." See attached screengrab.
To edit the category archive: /wp-admin/post.php?post=6363&action=edit (see WP access info for full site URL)
Hello. Thank you for contacting the Toolset support.
Issue 2: In an attempt to investigate this, I went to edit the category archive and I get an error "This block has encountered an error and cannot be previewed." See attached screengrab.
To edit the category archive: /wp-admin/post.php?post=6363&action=edit (see WP access info for full site URL)
==>
I've fixed that.
Issue 1: I noticed that the category archive on my site is not sorting in the correct order. It used to work and I'm not sure when this happened.
Example of a category archive that isn't sorting correctly: /team-group/lighting-control-shades/ (see WP access info for full site URL)
==>
I checked with my local test install and created taxonomy archive using blocks mode and set the order to Menu Order and its working as expected.
Then, I checked on your install and it seems that order of your archive is hijacked by your theme or any of third-party plugin you are using. So, as a workaround, I've added the following hook: pre_get_posts to 'Custom Code' section offered by Toolset:
=> hidden link
add_action( 'pre_get_posts', 'func_sort_tax_archive_menu_order',999);
function func_sort_tax_archive_menu_order($query) {
if ( !is_admin() && $query->is_main_query() and $query->is_tax('team-group') ) {
$query->set('orderby', 'menu_order');
}
return $query;
}
Thanks for your help. The only problem is that the posts are appearing in Descending menu_order instead of Ascending. Can you please change, or tell me how to change, to Ascending order?
I'm sorry, I just noticed that this issue is also affecting my other category archive as well.
Example: /line-card/commercial-industrial/
The rows should appear in ascending order by post title. I'm not sure what order is being shown currently.
Can you help? The login info provided should still work.
Thanks!
New threads created by Minesh and linked to this one are listed below: