Skip Navigation

[Résolu] Posts not appearing in alphabetical order

This support ticket is created Il y a 4 années et 7 mois. 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.

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 7 réponses, has 2 voix.

Last updated by davidR-12 Il y a 4 années et 7 mois.

Assisted by: Minesh.

Auteur
Publications
#1330257

Here you can see a category page with the products listed in alphabetical order:

hidden link

However, on this page the products list in alphabetical order but then there are others at the ened:

hidden link

These are using a Product category WordPress archive set to order by post title. However, changing to other order systems does nothing.

#1330411

Minesh
Supporter

Languages: Anglais (English )

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

Hello. Thank you for contacting the Toolset support.

I found that you are using few ordering plugins:
- Simple Page Ordering
- WooCommerce Sequential Order Numbers

What if you disable those and change to default theme - Do you see any difference?

If there is no difference:
Can you please share access details so I can check what's going wrong there?

I have set the next reply to private which means only you and I have access to it.

#1331433

Minesh
Supporter

Languages: Anglais (English )

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

I would like to know here:
I found that you are using few ordering plugins:
- Simple Page Ordering
- WooCommerce Sequential Order Numbers

What if you disable those and change to default theme - Do you see any difference?

Did you try to disable those plugins? As I can see we are displaying the term archive and on one term the order is working and on another its not working, this is strange.

Is it OK for you if I deactivate all non-Toolset plugins on your install?

#1332277

Hi Minesh,

I tried disabling the 2 plugins and switching to another theme but no change.

I cant allow you to disable the plugins as the site is live. Can I send you a Duplicator file zip for you to test?

Regards,

David

#1332287

Minesh
Supporter

Languages: Anglais (English )

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

I've added the following code to "Custom Code" section offered by Toolset:
=> hidden link

add_action( 'pre_get_posts', 'func_change_order_tax_archive'); 
function func_change_order_tax_archive($query){
       if (!is_admin() && $query->is_main_query() and  $query->is_tax( 'product_cat')) {
     
           //Set the order ASC or DESC
           $query->set( 'order', 'ASC' );
           //Set the orderby
           $query->set( 'orderby', 'title' );
        } 
}

More info:
=> https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/

Can you please confirm it works now as expected.

#1336483

Hi Minesh,

Thank you for this. Does this mean that the products are hard coded to be listed in alphabetical order now regardless of what is set in the view?

Regards,

David

#1337301

Minesh
Supporter

Languages: Anglais (English )

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

Does this mean that the products are hard coded to be listed in alphabetical order now regardless of what is set in the view?
=> yes , this is true but this only applies on Product category archive pages not on all pages.

For example:
=> hidden link
=> hidden link

#1337587

Thanks Minesh.

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