Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author nsp-code

    (@nsp-code)

    Unfortunate the only way to make the order to change for all queries without requiring to change the theme files is to turn the suppress_filters to false. But i’am going to release an update soon, where this will be leaved untouched if the auto-sort feature is turned OFF

    Thread Starter Ian Dunn

    (@iandunn)

    Are you sure it needs to modify ALL queries? There are ways you can detect which queries are being ran, like is_main_query().

    If it does need to modify all of them, there are still ways you can minimize the unintended consequences. One example that would have avoided the problem in my case would be to give users an option to select which post types are affected, and then have CPTO_pre_get_posts() check if the query is for those types before modifying the query.

    I think it’d also be a good idea to add a note to the main Description page or the FAQ to let users know it could cause conflicts with other plugins.

    Plugin Author nsp-code

    (@nsp-code)

    Yes, i am positive, as not everyone is a coder and can change the theme files, this is a must.
    Letting the users to chose the post type will not always work as the post_type is not required within a query.
    That’s a good suggestion, i’ll try to write a detailed document with the specifications and examples and include this notice.

    Plugin Author nsp-code

    (@nsp-code)

    You can always turn OFF the AutoSort feature which will leave the suppress_filters unchanged.

    Thread Starter Ian Dunn

    (@iandunn)

    Cool, thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Post Types Order causing conflicts with other plugins’ is closed to new replies.