Jump to content
Sign in to follow this  
jbrouwer

css search result page (google custom search)

Recommended Posts

jbrouwer

Hi, I used a hook in functions.php (base) to use Google custom search results on my site (www.pepperbase.com). It is working fine, but now I want to remove the original wordpress search results. On my localhost I added the following code in the base style sheet and it's working: .search .copy-pad{ display: none; } However, the code is not working online. I've cleared the cache, but its not working. What is going wrong? Adding !important also didn't work. Another option would be to remove the wordpress search results from the loop. But I cannot find the right pieces of code. Thx.

Share this post


Link to post
Share on other sites
Rob
This requires some customization I don't quite know how to do. Actually, I wish I did, so I am bumping this to a developer.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
kastelic
What plugin did you use? Does it need to use the standard wordpress search bar in order to work, or can't you replace that search bar with a google-only bar?

Share this post


Link to post
Share on other sites
jbrouwer
No plugin. Used this code in functions.php: add_action('pagelines_before_theloop','searchresults'); function searchresults(){ if (is_search()) : [google custom code here] I could also use the google bar, but then I was not able to let the search page pop-up. How could I do that? Thanks.

Share this post


Link to post
Share on other sites
Simon
easier way... copy this template.postloop.php into the platformbase folder and add your google code. http://pastie.org/2883400

Share this post


Link to post
Share on other sites
jbrouwer
Forgot the endif; statement at the end of the loop :-) works perfect. Thanks a lot!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×