WordPress.org

Ready to get started?Download WordPress

Forums

Tag search that looks through entire post (1 post)

  1. webrob
    Member
    Posted 7 months ago #

    I am working on a project where I want to display search results in a segmented way. I want to use the tags as my search terms in a drop down menu which I have already done. As of right now when you select a tag from the drop down it brings up all of the posts that have that tag.

    How I want to extend this is to also search the titles and body of the posts for those tags. Then I want to display these results by where the search term/tag was found.

    For example. I have a tag called "Amendment V". When Amendment V is selected from the drop down I want the results displayed like so

    The term Amendment V was found in the title in the following articles
    POST 1
    POST 2
    POST 3

    The term Amendment V was found in the body of the following articles
    POST 8
    POST 9
    POST 10

    The term Amendment V was a tag in the following articles
    POST 6
    POST 5
    POST 4

    Any help is appreciated.

Reply

You must log in to post.

About this Topic

Tags

No tags yet.