You must be logged in to post Login


Lost Your Password?

Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Moving Google Custom Search in Thesis

No Tags
UserPost

2:17 pm
December 20, 2011


Eric – PersonalProfitability.com

Portland, OR

Member

posts 2120

I just added back a Google Custom Search (AdSense Search) box on my site. I put it above the sidebar using Thesis Hooks, but I want to place it in the side of my navbar where the Subscribe link currently is (I know how to remove that, it is a placeholder).

Any ideas?

5:52 pm
December 20, 2011


The College Investor

San Diego, CA

Admin

posts 1935

Try this.  It is for Thesis search, but I'm sure you can modify it for Google Search.

 

remove_action('thesis_hook_before_header', 'thesis_nav_menu');add_action('thesis_hook_after_header', 'thesis_nav_menu');
function add_search_nav() { ?> <li class="search"><?php thesis_search_form(); ?></li><?php }
add_action('thesis_hook_last_nav_item','add_search_nav');

Please check out The College Investor at http://thecollegeinvestor.com!  This is the home of my Investing 101 Class.

Ready to Take Your Blog To The Next Level: http://beatthe9to5.com

You can also follow on Twitter @CollegeInvestin or Facebook at http://www.facebook.com/thecol…..geinvestor!

8:51 am
December 21, 2011


Eric – PersonalProfitability.com

Portland, OR

Member

posts 2120

I have this code in the Before Sidebar 1 hook with the Open Hooks plugin:

<form action="http://www.narrowbridge.net/results" id="cse-search-box">  <div>    <input type="hidden" name="cx" value="partner-pub-0128772486725372:svqi7brbp9c" />    <input type="hidden" name="cof" value="FORID:11" />    <input type="hidden" name="ie" value="ISO-8859-1" />    <input type="text" name="q" size="20" />    <input type="submit" name="sa" value="Search" />  </div></form><script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script>

If I drop that code into the bold part in Custom Functions will it work right?

remove_action('thesis_hook_before_header', 'thesis_nav_menu');add_action('thesis_hook_after_header', 'thesis_nav_menu');
function add_search_nav() { ?> <li class="search"><?php thesis_search_form(); ?></li><?php }
add_action('thesis_hook_last_nav_item','add_search_nav');

I don't want to kill my site by doing it wrong. Thanks.

12:25 pm
December 21, 2011


The College Investor

San Diego, CA

Admin

posts 1935

You need to make a custom function for the Googe Search.  Here is what the Google Search custom function should look like:

function googly() { 
?> 
<div class="goog"> 
<form action="http://www.google.com/cse" id="cse-search-box"> 
  <div> 
    <input type="hidden" name="cx" value="value_for_my_site" /> 
    <input type="hidden" name="ie" value="UTF-8" /> 
    <input type="text" name="q" size="31" /> 
    <input type="submit" name="sa" value="Search" /> 
  </div> 
</form> 
</div> 
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script> 
<?php 
}

Then, you need to use the code above to add it to your Nav Bar.  It won't kill your site.  You may need to play with the CSS to make it look right though.

Please check out The College Investor at http://thecollegeinvestor.com!  This is the home of my Investing 101 Class.

Ready to Take Your Blog To The Next Level: http://beatthe9to5.com

You can also follow on Twitter @CollegeInvestin or Facebook at http://www.facebook.com/thecol…..geinvestor!

12:25 pm
December 21, 2011


The College Investor

San Diego, CA

Admin

posts 1935

DIY Forums have a lot of good info on this.

Please check out The College Investor at http://thecollegeinvestor.com!  This is the home of my Investing 101 Class.

Ready to Take Your Blog To The Next Level: http://beatthe9to5.com

You can also follow on Twitter @CollegeInvestin or Facebook at http://www.facebook.com/thecol…..geinvestor!

10:07 am
December 27, 2011


Eric – PersonalProfitability.com

Portland, OR

Member

posts 2120

Got it! Thanks. I have to Tweak the size of the input box a bit but it is now in the right place.

No Tags

About the Yakezie.com Forum

Forum Timezone: America/Los_Angeles

Forum Stats:

Groups: 2
Forums: 9
Topics: 6383
Posts: 84794

Membership:

There are 13651 Members
There have been 20 Guests

There are 9 Admins
There are 8 Moderators

Top Posters:

My Personal Finance Journey – 3159
Khaleef @ KNS Financial – 3149
Budgeting in the Fun Stuff – 3048
Sustainable PF – 2759
Miss T @ Prairie Eco-Thrifter – 2213
Eric – PersonalProfitability.com – 2120

Administrators: The College Investor (1935 Posts), Financial Samurai (1803 Posts), LaTisha @YoungFinances (1715 Posts), Forest Parks (1337 Posts), 20s Finances (1147 Posts), Money Reasons (697 Posts), Chris Johnson (78 Posts), Sydney at Untemplater (0 Posts), Suba (0 Posts)

Moderators: Suba @ Wealth Informatics (1876 Posts), sooverthis (1041 Posts), PK @ DQYDJ (361 Posts), jmichelsen (208 Posts), Ramona (13 Posts), JeremyNJohnson (4 Posts), Moderator (0 Posts), rackgeek (0 Posts)