WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. unknownmale
    Member
    Posted 8 months 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.

    http://wordpress.org/plugins/post-types-order/

  2. nsp-code
    Member
    Plugin Author

    Posted 8 months 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
    Member
    Posted 8 months ago #

    Perfect, Thank you!!

Reply

You must log in to post.

About this Plugin

About this Topic