This support ticket is created 6 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.
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.
Hello. Thank you for contacting the Toolset support.
Well - your code looks like OK but without access details I will not be able to tell you whats causing the issue or why the order is not working.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.
Could you please check now. I've adjusted the code in your current theme's functions.php file as given under:
function sort_products_archive_loop($query) {
if (is_tax('product_cat') && $query->is_main_query()) {
$query->set('order', 'DESC');
$query->set('meta_key', 'wpcf-product-order');
$query->set('orderby', 'meta_value_num');
}
}
add_action('pre_get_posts', 'sort_products_archive_loop');
The issue was you were checking with post type archive but the current page you are loading is taxonomy archive so you need to check using the function is_tax().
Well - I just noticed that you are using Beta plugins, those are outdated and we have stable release available for all Toolset plugins.
We always recommend to run your site with latest stable release plugin version.
*** Please make a FULL BACKUP of your database and website.***
Could you please update ALL Toolset plugins to it's latest official released version. You can download latest plugin release from your accounts page:
=> https://toolset.com/account/downloads/
I have updated the plugins views and types but the problem still occurs. I also can not add pagnation to the wordpress archive. Products are limited to a maximum of three