Saltar navegación

[Resuelto] Posts not appearing in alphabetical order

This support ticket is created hace 5 años, 5 meses. 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.

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)

Este tema contiene 7 respuestas, tiene 2 mensajes.

Última actualización por davidR-12 hace 5 años, 5 meses.

Asistido por: Minesh.

Autor
Mensajes
#1330257

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

enlace oculto

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

enlace oculto

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

Idiomas: Inglés (English )

Zona horaria: 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

Idiomas: Inglés (English )

Zona horaria: 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

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

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

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

Idiomas: Inglés (English )

Zona horaria: 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:
=> enlace oculto
=> enlace oculto

#1337587

Thanks Minesh.