How to Make the Search Feature in Your Blog Only Search Blog Posts

A white, rounded square logo with an abstract S-shaped design on a gradient blue and purple background.

Editing Your Blog Search Box to Only Produce Results in Your Blog

Recently a client asked us if we could adjust the blog search feature to only search posts in the blog (rather then searching individual pages of the website).

Why, yes – we can and so can you. To do this just add the line of code below.

<input type=”hidden” name=”post_type” value=”post” />

By adding this line of code you will only generate search results withing the blog platform. It is a quick and simple adjustment that can make the content within your blog more searchable.

Check out these other quick fixes:

Share This
Blog Decorative Background

Join the Sales and Marketing News, receive our last insights, tips and best practices.

Our 7 Guarantees

Keeping 2,000+ Clients Happy Since 2001.

1
You Will Love Your Design We design to please you and your clients
2
Same-Day Support 24-hour turnaround edits during business hours
3
Free Education We provide knowledge to help you expand
4
No Hidden Charges We quote flat-rate projects
5
Own Your Site No strings attached
6
We Create Results SEO, PPC, content + design = clients
7
We Make Life Easier One agency for web, branding and marketing