• hey guys i am running a website Awesome Moviez and in this when i search for something i get all result who have that search value but i want that only the titles of the post are being searched instead of whole content of the site… can any one help me out with this thanx in advance.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I’m guessing that search terms end up in the same general query that runs for nearly every other content page in WP. You’ll need to confirm this, but even if wrong, the general concept stands, you’ll just need a different hook.

    The WHERE portion of the search query contains a list of all posts table columns searched. You’ll want to remove all but “post_title”. You can access the WHERE terms of the general query by hooking the ‘posts_where’ filter.

Viewing 1 replies (of 1 total)
  • The topic ‘Getting Problem with the Search Box’ is closed to new replies.