Search by title or custom field wordpress

1

I have created several pages with their respective titles and others, right? Besides, each of them has a custom field called: "color" and can have any value.

My question is, how can I return in a PHP all the results of the pages that match when they search for their title or for the value of the custom field "color"? I give an example:

Title page and color

New car Seat - red
Car Seat Lion - Yellow
Audi 1234 car - Tree

I need to return, for example, "Seat car lion" if someone in the search engine has put: "car" or "seat" or "lion car" and "yellow". Am I clear?. You can search by title or by title and color or only by color. they are optional fields. The value "color" is a select in case that serves as something.

Thank you very much

Regards, Angel.

    
asked by Ángel 14.11.2016 в 12:46
source

0 answers