Add a Search Box to AdFlex
How to add a Search Box to Ad Flex theme?
Just follow those steps to add a Search Box to AdFlex theme:
- On the server, located the folder:
WP_ROOT/wp-content/themes/ad-flex-blog/syndication
- In the folder, you’ll see the filename "_syndication_custom_search.php"
- Rename the file "_syndication_custom_search.php" to "syndication_custom_search.php"
- Open the file "syndication_custom_search.php"
- Add the following code at the end of the file content "syndication_custom_search.php":
<ul>
<li>
<h2>Search</h2>
<ul>
<li>
<form method="get" id="searchform" action="<?php bloginfo('url'); ?>">
<input type="text" value="Enter your search" name="s" id="s" onblur="if (this.value == '') { this.value = 'Enter your search';}" onfocus="if (this.value == 'Enter your search') {this.value = '';}" />
<input type="hidden" id="searchsubmit" />
</form>
</li>
</ul>
</li>
</ul>
- Save the file "syndication_custom_search.php"
- Connect to the WP Admin \ Presentation \ Ad Flex Options
- Locate the section "Sidebar Options"
- Scroll down to the parameter "Search Code Visibility" and enable it.
- Click on "Update All Options"
Now you can connect to your blog URL and you should see a Search Box on the sidebar.





Thanks for that!
For the ones that like to use the Google Search function put the Google Search code in it instead!
Search
Ollie
Hey, thanks VK!
Works like a charm.
I’ve put it on my news site where it is very appropriate.
Regards,
Laurie.
Isit possible to add a “Go” Icon beside the search?
In case visitors have “faulty keyboards”
Bran
For me it worked fine, no problems. It looks a lot better too with the searchbox, allthough not many people use them, it is a kind of service you have to have on your website I think….
having a search box was a brilliant idea,
It’s A Masterpiece!……………..:)