/* ----------------------------------------------------------------- * PART C-1 • Let PUBLIC search also match the slug * (WP 3.3: posts_search has ONE parameter) * ---------------------------------------------------------------- */ add_filter( 'posts_search', function ( $search ) {// Front-end search for guests only if ( ! is_search() || is_admin() || ( function_exists( 'is_user_logged_in' ) && is_user_logged_in() ) ) { return $search; }global $wpdb; $s = get_query_var( 's' ); if ( ! $s ) { return $search; }$slug = sanitize_title( $s ); // mercy → mercy $like1 = $wpdb->prepare( " OR {$wpdb->posts}.post_name = %s ", $slug ); $like2 = $wpdb->prepare( " OR {$wpdb->posts}.post_name = %s ", $slug . '-chords' );// $search begins with "AND (" … ")" $pos = strrpos( $search, ')' ); if ( $pos !== false ) { $search = substr_replace( $search, $like1 . $like2, $pos, 0 ); } return $search; }, 10 ); Tai Anderson Chords @ WorshipChords.com

Tai Anderson Songs