Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Marius Serban
Marius Serban
7,115 Points

WP GURU ADVICE NEEDED --- How can I search only within the article in WP website?

What should I do so when I search on my WordPress website, using the WP search function, not Google, to only look for the word(s) that I'm searching for inside the title and body text of that article? Right now, I looked for a word, and it said it founded it. I clicked on the article and opened it, (Cmd + F) to search again for that word and it didn't found it. It seems like that word was inside an anchor tag. Is there a way to avoid looking that deep? Thank you!!!

J.T. Gralka
J.T. Gralka
20,126 Points

Hi Marius Serban!

It would help to see what your theme's search.php file looked like. Do you have a version of it you could post?

A good place to start would be to take a look at this article on the WordPress documentation site for a breakdown of how to structure your search results template in finer detail.