Id like to use the blurp area of the theme as a search box rather than having it in the sidebar. How do I go about doing that?
Blurp as Search Box
(28 posts)
(3 voices)
-
Posted 1 year ago #
-
Posted 1 year ago #
-
Yes that would be great. And I dont want the text box/button either...just the search field.
Posted 1 year ago # -
Open up
/wp-content/themes/infocus/includes/template-single.phpand add the following code on line 155.<div class="widget scg_widget KerioConnect widget_search" id="search-4"><div style="position: absolute; top: 55px; right: 0px;" class="search-box"> <form action="http://www.mysite.com/" method="get"> <input type="text" onblur="if (this.value == '') {this.value = 'Search...';}" onfocus="if(this.value == 'Search...') {this.value = '';}" value="Search..." id="s" name="s" class="search-field" size="15"> </form> </div> </div>This will insert a search box on your single posts. To get them on your pages also then you will need to do the same thing to page.php and template-full.php.
Let us know if this works for you geekgurl00.
Posted 1 year ago # -
In case anyone is interested, this code snippet will also put the search in the header if you insert it after line 92 in header.php ( see my screenshots)
Posted 1 year ago # -
I dont have a file called template-single.php in my directory and my full-template only goes to line 99. I tried pasting in the code where I think it should go, but I still get the title and a phrase saying: "A state permitting clear perception and understanding; the area that may be seen distinctly or resolved into a clear image. " And Im not sure how to get rid of that.
Thanks!
KristinPosted 1 year ago # -
Hey Kristin,
In each of the files listed you should see some code like this..
<?php //Header Teaser Text Options if (!$teaser_text || $teaser_text == 'default') { if ($header_teaser == 'customtext' && $teaser_custom) { echo stripslashes($teaser_custom); } if ($header_teaser == 'twitter' && !$twitter_id) { echo 'You must have your Twitter user name entered in the "General Settings" tab of your themes options for this to function properly.'; } if ($header_teaser == 'twitter' && $twitter_id) { $usernames = $twitter_id; $limit = '1'; $type = 'teaser'; parse_cache_feed($usernames, $limit, $type); } }else{ if ($teaser_text == 'custom' && !$teaser_text_custom) { echo stripslashes($teaser_custom); } if ($teaser_text == 'custom' && $teaser_text_custom) { echo stripslashes($teaser_text_custom); } if ($teaser_text == 'twitter' && !$twitter_id) { echo 'You must have your Twitter user name entered in the "General Settings" tab of your themes options for this to function properly.'; } if ($teaser_text == 'twitter' && $twitter_id) { $usernames = $twitter_id; $limit = '1'; $type = 'teaser'; parse_cache_feed($usernames, $limit, $type); } } ?>You will want to paste the code immediately after this. Sorry, I gave you the wrong directory in the last post. To find
template-single.phpfirst look in your template directory and open the folderliband then open the folderincludesand you should see the file there.If you are having trouble then let us know and we will make the changes for you.
Posted 1 year ago # -
Ive pasted the code into the template, but it is still not working. Ive attached a pic of what is happening. Ive also set the Header Teaser Text to Custom on the main options page of the theme.
Posted 1 year ago # -
Hello geekgurl00,
Let's try this.. Download the attached file and extract it to
/wp-content/themes/infocus/lib/includes/View one of your posts and let me know if you see a search bar.
Posted 1 year ago # -
Hello geekgurl00,
Let's try this.. Download the attached file and extract it to /wp-content/themes/infocus/lib/includes/
View one of your posts and let me know if you see a search bar.
Posted 1 year ago # -
That worked! Is there a way to have the same effect on my pages too and not just the posts?
Thanks for all the help!
Posted 1 year ago # -
Yes we can do this for pages as well.. I am kind of busy right now geekgurl00 (computer problems) but I should get back with you tonight with the fixes.
Posted 1 year ago # -
No problem. Im just glad for the help!
Posted 1 year ago # -
Download and extract this file to
/wp-content/themes/infocus/for pages. It will not show up on the portfolio / blog page. If you want those too let me know.Posted 1 year ago # -
Download and extract this file to
/wp-content/themes/infocus/for pages. It will not show up on the portfolio / blog page. If you want those too let me know.Posted 1 year ago # -
Ive copied the file over and set the Header teaser text to custom under general settings and it's still not showing up. Do I need to do anything else to make it work?
Posted 1 year ago # -
Hello geekgurl00,
Is it a full width or default page?
Posted 1 year ago # -
Its the full width page.
Posted 1 year ago # -
I got it to work with full template. Thanks again for all your help!
KristinPosted 1 year ago # -
Open up
/wp-content/themes/infocus/template-full.phpand at the top you should see some code like this..<div id="intro_blurb"<?php if ($header_disable){echo ' style="display:none;"';}?>> <div class="inner"> <div id="intro_blurb_title"><span><?php the_title(); ?></span></div> <div id="blurb"> <?php //Header Teaser Text Options if (!$teaser_text || $teaser_text == 'default') { if ($header_teaser == 'customtext' && $teaser_custom) { echo stripslashes($teaser_custom); } if ($header_teaser == 'twitter' && !$twitter_id) { echo 'You must have your Twitter user name entered in the "General Settings" tab of your themes options for this to function properly.'; } if ($header_teaser == 'twitter' && $twitter_id) { $usernames = $twitter_id; $limit = '1'; $type = 'teaser'; parse_cache_feed($usernames, $limit, $type); } }else{ if ($teaser_text == 'custom' && !$teaser_text_custom) { echo stripslashes($teaser_custom); } if ($teaser_text == 'custom' && $teaser_text_custom) { echo stripslashes($teaser_text_custom); } if ($teaser_text == 'twitter' && !$twitter_id) { echo 'You must have your Twitter user name entered in the "General Settings" tab of your themes options for this to function properly.'; } if ($teaser_text == 'twitter' && $twitter_id) { $usernames = $twitter_id; $limit = '1'; $type = 'teaser'; parse_cache_feed($usernames, $limit, $type); } } ?> </div> </div><!-- inner --> </div><!-- intro_blurb -->To get the search bar to show then you just paste this code..
<div class="widget scg_widget KerioConnect widget_search" id="search-4"><div style="position: absolute; top: 55px; right: 0px;" class="search-box"> <form action="http://www.mysite.com/" method="get"> <input type="text" onblur="if (this.value == '') {this.value = 'Search...';}" onfocus="if(this.value == 'Search...') {this.value = '';}" value="Search..." id="s" name="s" class="search-field" size="15"> </form> </div> </div>at the end before the ending </div> tags like this..
<div class="widget scg_widget KerioConnect widget_search" id="search-4"><div style="position: absolute; top: 55px; right: 0px;" class="search-box"> <form action="http://www.mysite.com/" method="get"> <input type="text" onblur="if (this.value == '') {this.value = 'Search...';}" onfocus="if(this.value == 'Search...') {this.value = '';}" value="Search..." id="s" name="s" class="search-field" size="15"> </form> </div> </div> </div> </div><!-- inner --> </div><!-- intro_blurb -->If you are confused then open up the file I gave you.. page.php and you can see how it is done. Just do the same thing to all pages where you want the search bar to display.
Posted 1 year ago # -
Ive got the search bar to show, but Im trying to remove the title tag. Ive taken out the <php title> tags, but Im still left with this blue bar. How do I remove that?
Thanks!
KristinPosted 1 year ago # -
For that you will need to comment out the entire line like this..
<!--<div id="intro_blurb_title"><span><?php //the_title(); ?></span></div>-->If you do it on template-full then it will apply to all full width pages if you do it to page.php then it will apply to all default pages, etc etc.
Posted 1 year ago # -
Posted 1 year ago #
-
Hey Kristin,
Download the attached file and extract to
/wp-content/themes/infocus/Let us know if it works.
Posted 1 year ago # -
I copied it over and reset the URL to localhost/wordpress and it is still not working. It is just a empty box like before.
Thanks!
KristinPosted 1 year ago # -
Hello geekgurl00,
If that file did not work then you are most likely not using the full width template or you have some other customizations going on.
Give me a link to your page where it is not working. If that is not possible then I recommend downloading a fresh version of inFocus so it will work for you.
Posted 1 year ago # -
Im running the file off a pen drive since its my test site. Ill try the fresh install and report back.
Thanks!Posted 1 year ago # -
That did work. Now how do I go about doing the same on the default template?
Thanks for all your help!
KristinPosted 1 year ago # -
Hey Kristin,
Download the attached file and extract to
/wp-content/themes/infocus/Let us know if it works.
Posted 1 year ago # -
That worked too. Thanks again for all your help!
KristinPosted 1 year ago #
Reply
You must log in to post.













