WordPress.org

Ready to get started?Download WordPress

Forums

How to change search results based in content and not just titles? (1 post)

  1. acr_project
    Member
    Posted 1 year ago #

    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');`

Topic Closed

This topic has been closed to new replies.

About this Topic