Unable to change run order of pre_get_posts hook in between two plugins

18 Views Asked by At

I'm using two plugins on the site. One is https://wordpress.org/plugins/real-custom-post-order/ and other is custom built. Both the plugins use pre_get_posts hook to modify the post order.

I want to change order on some category archives using the custom plugin but it is not able to override the order by https://wordpress.org/plugins/real-custom-post-order/ plugin even after adding priority.

Any help appreciated. You can reproduce the issue by adding a pre_get_posts hook to theme and try to set orderby to title.

$query->set('order', 'ASC');

I tried adding priority to the hook in custom plugin I built but the Real Post's hook is overriding it.

0

There are 0 best solutions below