Jump to content
Sign in to follow this  
Sourena

Replacing Search in the Header

Recommended Posts

Sourena

"Search" can be hidden by chosing the option in the theme's setting page. But is there any way to replace Search in the header with a text or image? Is there any way to do that through using the "functions.php" file?


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
Andrew

Hey Sourena, Which theme are you on again? Yes, its possible... but I'll need to see your site.

Share this post


Link to post
Share on other sites
Sourena

EcoPro. I am trying to use it for a client. The dummy site is here: http://alefba.us/agccarpet/ The client needs a phone number and email in the top right of the header to replace the empty space after removing the "search". It also might be a "Call us for a Quote" button. That is why I want to see if it is possible to replace it. An option in the setting page would be excellent. Something that allows the user to replace search with an image or HTML code.


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
cmunns

The search bar is called from the header via PHP Easiest thing to do would be replace that include function with a div that contains your button. Do you know HTML?

Share this post


Link to post
Share on other sites
Sourena

Thanks. I know basic HTML, and I can find my way in PHP documents if the issue is not that complicated. I try to find the lines in Header and replace them with the image I want. But it could be really useful if you add this to your setting page.


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
bryan-hadaway

Good work, I see you got this fixed on the website. Thanks, Bryan

Share this post


Link to post
Share on other sites
Sourena

Not really. I just removed the search But when I replaced it with the image it did not float to the top right of the page.


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
Sourena

I fixed it, but I wish I could do it through "functions.php" so I do not need to edit the theme's files.


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
ordermindsovermediacom

I am trying to add client log in username and password boxes on the top right of the EcoPro header. Where would I place the code below in the header.php file? What line of code? Thanks. <form method="POST" action="http://affiliate.flwtracker.com/login.php"> Username: <input type="text" name="username" /> Password: <input type="password" name="password" /> <input type="submit" value="Login"> </form>

Share this post


Link to post
Share on other sites
Sourena

This line:

<?php if(!pagelines('hidesearch')) include (THEME_LIB . '/_searchform.php'); ?>

which is the line 65 in "header.php".


alefba.us

Web Development & Design for Right-to-Left languages

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  

×