-
Google Search Box
My search box sits a bit low on the navigation line of each page. How can I fix this?
See here: http://primalhealth.co/food/
Brad
-
I haven't checked Google Search lately.. i know they made some changes but check out this thread.
http://www.socratestheme.com/forum/s...4&postcount=40
Don't forget our forum search box.. you can find the answer to most anything.
-
Thanks mate. Will do.
Think I worked it out. The search button doesn't work though now?
See here: http://primalhealth.co/category/movement_cat/
Brad
-
Was it working before you made the changes? If so, something might have gotten overwritten or changed to affect the function. I would doublecheck the code.
-
Not sure if it was. I would have tested it ages ago when I first bought the theme. I've only just started getting into over the last few weeks hence the barrage of new emails from me 
Hmm I wouldn't really know what to look when it comes to the code being different in the case of adsense and search. Sorry mate. This is what i have done under each step where required:
1. Create a blank page named: Search in your wordpress page editor.
2. Choose iFrame in look and feel. Add your new search page as the search results page.
I didn't quite know what you meant at this stage. 'Add your new search page as the search results page'. Add the blank search page to where?
3. Get the Code for search box and paste it in Socrates > Layout
I pasted this:
<div id="cse-search-form" style="width: 100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1', {language : 'en'});
google.setOnLoadCallback(function() {
var customSearchOptions = {};
var googleAnalyticsOptions = {};
googleAnalyticsOptions['queryParameter'] = 'term';
googleAnalyticsOptions['categoryParameter'] = '';
customSearchOptions['googleAnalyticsOptions'] = googleAnalyticsOptions;
var customSearchControl = new google.search.CustomSearchControl(
'007861761337169237212:nb7emuuvmnm', customSearchOptions);
customSearchControl.setResultSetSize(google.search .Search.FILTERED_CSE_RESULTSET);
var options = new google.search.DrawOptions();
options.setSearchFormRoot('cse-search-form');
customSearchControl.draw('cse', options);
}, true);
</script>
<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
<style type="text/css">
.gsc-control-cse {
font-family: Verdana, sans-serif;
border-color: #FFFFFF;
background-color: #FFFFFF;
}
input.gsc-input {
border-color: #643200;
}
input.gsc-search-button {
border-color: #488302;
background-color: #CECECE;
}
.gsc-tabHeader.gsc-tabhInactive {
border-color: #E9E9E9;
background-color: #E9E9E9;
}
.gsc-tabHeader.gsc-tabhActive {
border-top-color: #FF8040;
border-left-color: #E9E9E9;
border-right-color: #E9E9E9;
background-color: #FFFFFF;
}
.gsc-tabsArea {
border-color: #E9E9E9;
}
.gsc-webResult.gsc-result,
.gsc-results .gsc-imageResult {
border-color: #FFFFFF;
background-color: #FFFFFF;
}
.gsc-webResult.gsc-result:hover,
.gsc-webResult.gsc-result.gsc-promotion:hover,
.gsc-imageResult:hover {
border-color: #FFFFFF;
background-color: #FFFFFF;
}
.gs-webResult.gs-result a.gs-title:link,
.gs-webResult.gs-result a.gs-title:link b,
.gs-imageResult a.gs-title:link,
.gs-imageResult a.gs-title:link b {
color: #488302;
}
.gs-webResult.gs-result a.gs-title:visited,
.gs-webResult.gs-result a.gs-title:visited b,
.gs-imageResult a.gs-title:visited,
.gs-imageResult a.gs-title:visited b {
color: #488302;
}
.gs-webResult.gs-result a.gs-title:hover,
.gs-webResult.gs-result a.gs-title:hover b,
.gs-imageResult a.gs-title:hover,
.gs-imageResult a.gs-title:hover b {
color: #488302;
}
.gs-webResult.gs-result a.gs-title:active,
.gs-webResult.gs-result a.gs-title:active b,
.gs-imageResult a.gs-title:active,
.gs-imageResult a.gs-title:active b {
color: #488302;
}
.gsc-cursor-page {
color: #488302;
}
a.gsc-trailing-more-results:link {
color: #488302;
}
.gs-webResult .gs-snippet,
.gs-imageResult .gs-snippet,
.gs-fileFormatType {
color: #000000;
}
.gs-webResult div.gs-visibleUrl,
.gs-imageResult div.gs-visibleUrl {
color: #643200;
}
.gs-webResult div.gs-visibleUrl-short {
color: #643200;
}
.gs-webResult div.gs-visibleUrl-short {
display: none;
}
.gs-webResult div.gs-visibleUrl-long {
display: block;
}
.gs-promotion div.gs-visibleUrl-short {
display: none;
}
.gs-promotion div.gs-visibleUrl-long {
display: block;
}
.gsc-cursor-box {
border-color: #FFFFFF;
}
.gsc-results .gsc-cursor-box .gsc-cursor-page {
border-color: #E9E9E9;
background-color: #FFFFFF;
color: #488302;
}
.gsc-results .gsc-cursor-box .gsc-cursor-current-page {
border-color: #FF8040;
background-color: #FFFFFF;
color: #488302;
}
.gsc-webResult.gsc-result.gsc-promotion {
border-color: #488302;
background-color: #FFFFFF;
}
.gs-promotion a.gs-title:link,
.gs-promotion a.gs-title:link *,
.gs-promotion .gs-snippet a:link {
color: #488302;
}
.gs-promotion a.gs-title:visited,
.gs-promotion a.gs-title:visited *,
.gs-promotion .gs-snippet a:visited {
color: #488302;
}
.gs-promotion a.gs-title:hover,
.gs-promotion a.gs-title:hover *,
.gs-promotion .gs-snippet a:hover {
color: #488302;
}
.gs-promotion a.gs-title:active,
.gs-promotion a.gs-title:active *,
.gs-promotion .gs-snippet a:active {
color: #488302;
}
.gs-promotion .gs-snippet,
.gs-promotion .gs-title .gs-promotion-title-right,
.gs-promotion .gs-title .gs-promotion-title-right * {
color: #000000;
}
.gs-promotion .gs-visibleUrl,
.gs-promotion .gs-visibleUrl-short {
color: #643200;
}
</style>
4. Add this to Socrates > Styling custom css box.
Quote:
#im-searchForm { position:absolute; top:145px; left:680px; width:293px; z-index:5; text-align:right}
#searchBtn { float:right}
Otherwise it's virtually impossible to align search button..
4. Get the Code for search results box and paste it in html of the search page you created.
I placed this in HMTL: <div id="cse" style="width:100%;"></div>
Whaddya think?
-
Your code is different from mine. Can you try using the default code from http://google.com/cse
And remove the extra css.
Finally that's not the search results page..
Watch this video.. it's excellent.
http://www.tipsandtricks-hq.com/how-...-tutorial-3967
-
Hey Dan
Just after I finally got this working, I changed the CSS details in the styling section and now it doesn't work again... arghh! Can you check to see whats up?
http://primalhealth.co/category/people-like-you/
Brad
-
Pasted in the code again to make sure and now it works sort of. When i type in the words FOOD and BRAD I get results. When I type in FOUR HOUR (I have an article on the 4 hour work week) it comes up with a blank page. When I type in things like BEER which I know isn't on the site it shows a blank screen.
Brad
-
After further testing, searching using the SEARCH box that appears at the top of the search page works every time. The navigation bar search area is the issue. What I don't know.
-
I would search google for info. I'm still on vacation and working from iPad. I can't do much debugging and there must be info in google on this.
Similar Threads
-
By kiko987 in forum Official Support
Replies: 3
Last Post: 10-15-2011, 07:44 PM
-
By vman1964 in forum Official Support
Replies: 3
Last Post: 07-20-2011, 12:15 PM
-
By kipniswonger in forum Bug Reporting and Fixes
Replies: 2
Last Post: 05-25-2011, 09:33 PM
-
By Kacy in forum Official Support
Replies: 1
Last Post: 03-19-2011, 08:22 PM
-
By srowen in forum Official Support
Replies: 1
Last Post: 07-16-2010, 07:54 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|