Viewing 3 replies - 1 through 3 (of 3 total)
  • I never expected that code to stand the test of time.

    I’ll see if i can come up with something else, better…. 🙂

    Tested the code quickly, and can confirm the problem, code needs a little tweak.

    if( is_admin() && isset( $wp_query->query_vars['s'] ) ) {

    The query var will always be set, switch that line to read.

    if( is_admin() && is_search() ) {

    Also this line.

    if( !is_admin() || !$wp_query->query_vars['s'] )

    ..to..

    if( !is_admin() || !is_search() )

    And you shouldn’t get duplicate posts anymore..

    Going to see if i can find a smarter/better way to do this, but in the mean time the above should hopefully fix that problem for you.

    Thread Starter roastlechon

    (@roastlechon)

    Thanks! Works great! If you do find a better way to do this, let me know in this thread!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Search Custom Field Data (Revisited)’ is closed to new replies.