Post Types Order
[resolved] Exclude from query (3 posts)

  1. unknownmale
    Posted 3 years ago #

    Is there a way of running a query which superseeds the plugin?

    I have one page with post titles running in the sidebar and then posts in the main content area.

    I don't want the sidebar to be reordered, orderby=title&order=ASC not working.


  2. nsp-code
    Plugin Author

    Posted 3 years ago #

    You can switch OFF the Autosort and include 'orderby' => 'menu_order' just for queries where the sort need to apply.
    Also you can try to remove the plugin orderby filter, right before you run the query
    remove_filter('posts_orderby', 'CPTOrderPosts', 99, 2);
    then put it back after the loop
    add_filter('posts_orderby', 'CPTOrderPosts', 99, 2);
    to allow further queries to autosort.

    Or if you own the Advanced Post Types Order the 'force_no_custom_order' => TRUE can be used to make the filters to ignore the Autosort ON so it will return the order specified within the query. For more details and examples check on this link http://www.nsp-code.com/advanced-post-types-order-api/sample-usage/

  3. unknownmale
    Posted 3 years ago #

    Perfect, Thank you!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic