Skip Navigation

[Resolved] News Items sorting is broken again

This thread is resolved. Here is a description of the problem and solution.

Problem: The sort order of one of my Views is no longer accurate.

Solution: The Post Types Order plugin is causing a conflict here, setting the sort to be "menu order" instead of the View settings. You can try adjusting a setting in wp-admin > Settings > Post Type Order. Uncheck the "Auto sort" checkbox and test the results on the site.

This support ticket is created 5 years 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Christian Cox 5 years ago.

Assisted by: Christian Cox.

Author
Posts
#1390369

When we had this problem before it appeared that the Speed of Light plugin was conflicting with the query to populate the News & Ideas page. I stopped using that plugin and replaced it with the caching plugin provided with Siteground hosting. I haven't added any plugin but about a week ago I did update the plugin that had new versions. Now the news items are sorting pretty randomly.

Today i turned off all the plugins except the toolset and astra pro plugin and it didn't not fix the problem.

I was also curious if all of the toolset plugins have to be active once development is complete. Toolset helped me create a pretty robust admin tool for the employees to add new content so I don't think the database will change for some time.

#1390721

Today i turned off all the plugins except the toolset and astra pro plugin and it didn't not fix the problem.
Hi, I went to Toolset > Settings > Front-end Content and temporarily activated debug mode. I can see in the query that the results are being sorted by "menu order", which usually happens because of a conflict with some other plugin or theme setting. If it's okay with you, I can activate the Duplicator plugin, make a clone of the site, and try to isolate the issue in my local environment.

I was also curious if all of the toolset plugins have to be active once development is complete.
Most should remain active, but these can be deactivated after you have set everything up:
Toolset Advanced Export
Toolset Module Manager
Toolset Framework Installer

#1391933

Hi, Christian. Thank you for your efforts so far. Feel free to do what you need to regarding the plugins and making a copy. This conflict issue is something I really don't understand. If your plugin sends a query to the database how does the sort order get changed by another plugin? Is there anyway to wall this off in the future? Jim

#1392585

If your plugin sends a query to the database how does the sort order get changed by another plugin?
The standard in WordPress is not to query the database directly, but to use the WordPress API to query posts. That API comes with filter hooks other plugins can use to tap into specific parts of the query and make their own changes. It's a common implementation with WordPress.

It seems to be the Post Types Order plugin overriding sort orders in Views. These two systems are bound to compete for determining sort order. You can try adjusting a setting in wp-admin > Settings > Post Type Order. Uncheck the "Auto sort" checkbox and test the results on the site. I'm not sure where else the Post Types Order plugin should be changing post order, so you'll need to determine if the conflict is acceptable or not.

#1392653

Thank you for the explanation about the API. I've had that question for years.

The client is promoting someone at their main office in Seattle to support the site (I'm a contractor based in San Diego) and I have passed the information on to them. I think the ticket can be closed, I just wanted to take the chance to thank you and all the support staff for your help with this enormous project. I couldn't have done it without your help!

Jim

#1392655

Great, I hope all goes well with the project turnover!