Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author TC.K

    (@wp_dummy)

    When you customize the result output, did you changed the arguments to pass to the WP_Query class?
    And make sure the changes is saved when you can the sorting option.

    Thread Starter kurdt_the_goat

    (@kurdt_the_goat)

    No, my customize output code is exactly like the one on your site https://9-sec.com/2014/01/ultimate-wp-query-search-filter/ (except the html in the while loop obviously). For some reason i was missing the line:
    global $post
    But i’ve added that now and nothing has changed.
    The setting is definitely saving.
    I’ve got the Post Types Order plugin installed, but i’ve set it to not automatically update any queries so i don’t think that’s affecting it either.

    Thread Starter kurdt_the_goat

    (@kurdt_the_goat)

    Ok, i actually disabled Post Types Order plugin altogether and now the search sorts correctly. I need that plugin elsewhere though so… can you tell me how to hard code a order and orderby on your customize_output function? Thanks.

    Thread Starter kurdt_the_goat

    (@kurdt_the_goat)

    I think i found a workaround – forcing Post Types Order to be disabled.
    In the UWPQSF customize_output function, before the query
    remove_filter('posts_orderby', 'CPTOrderPosts', 99, 2);
    then after the query
    add_filter('posts_orderby', 'CPTOrderPosts', 99, 2);

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sort as Title ASC not working’ is closed to new replies.