Forum Replies Created

Viewing 1 replies (of 1 total)
  • Forum: Fixing WordPress
    In reply to: Search titles only
    Thread Starter gfiorear

    (@gfiorear)

    I could achive this by making the following changes:

    File: wp-includes/query.php

    REPLACE:

    $search .= “{$searchand}(($wpdb->posts.post_title LIKE ‘{$n}{$term}{$n}’) OR ($wpdb->posts.post_content LIKE ‘{$n}{$term}{$n}

    WITH:

    $search .= “{$searchand}(($wpdb->posts.post_title LIKE ‘{$n}{$term}{$n}’) )”;

    REPLACE:

    $search .= ” OR ($wpdb->posts.post_title LIKE ‘{$n}{$term}{$n}’) OR ($wpdb->posts.post_content LIKE ‘{$n}{$term}{$n}’)”;

    WITH:

    $search .= ” OR ($wpdb->posts.post_title LIKE ‘{$n}{$term}{$n}’) “;

Viewing 1 replies (of 1 total)