WordPress.org

Support

Support » Themes and Templates » How to change search results based in content and not just titles?

How to change search results based in content and not just titles?

  • Hello, I have a quick question,
    I purchased a theme for my wordpress site and it included a search form, but when you search something it doesn’t include the content of the pages or posts just the title.

    So I want to change the search code so it displays results if a post has content with the keywords that the user searches.

    This is a funtion that my theme has for the search form.

    `// Only display posts on search results page
    if (is_search())
    $query->set(‘post_type’, ‘post’);`

  • The topic ‘How to change search results based in content and not just titles?’ is closed to new replies.
Skip to toolbar