Home Forums General Issues percentage in sql Reply To: percentage in sql

  • I luckily found a cached version of that support thread. Looks like the support forum’s syntax highlighter library is broken or not loading. Anyway here is the snippet that @kokers provided there:

    function my_posts_where( $where ) {
        global $wpdb;
        $where = str_replace(
                  "meta_key = 'locations_%", 
                  "meta_key LIKE 'locations_%",
        return $where;
    add_filter('posts_where', 'my_posts_where');