-
AuthorPosts
-
February 3, 2017 at 4:35 pm #742448
Hi all,
I have a large background image spanning across the top of my main page.
I would like to have a large search bar overlaying it.
I cannot seem to figure out where or how I can achieve this.
Any solutions would be greatly appreciated.
Thank youFebruary 6, 2017 at 2:36 pm #743375Hey!
You can add following code to Functions.php file in Appearance > Editor
add_shortcode('avia_search', 'get_search_form');
and then add search bar to your content using following shortcode
[avia_search]
Best regards,
YigitFebruary 6, 2017 at 4:05 pm #743428Hello,
Thank you for your help.
If I am adding this code into the php file in the editor, when I eventually update the theme, won’t the update undo this new code I am adding?
I am using the Enfold child theme, if that makes any difference.
Please advise,
thank youFebruary 6, 2017 at 4:06 pm #743430Hey!
Since you are using a child theme, when you add the code to functions.php file of your child theme, it will not be overwritten when you update the theme. Only parent theme files are overwritten while child theme files remain intact
Cheers!
YigitFebruary 6, 2017 at 5:07 pm #743460Excellent!
Works great. And good to know about it not getting overwritten.However, could you tell me how I could center the search bar on the screen?
Right now it’s stuck to the left and I can’t seem to find a way to get it into the center.Any tips?
Thank you
- This reply was modified 7 years, 9 months ago by darryllevine.
February 11, 2017 at 7:11 am #745701Hi,
Would you mind providing a precise link to your site, showing the elements in question? We need to be able to inspect them in order to help :)
Best regards,
VinayFebruary 11, 2017 at 7:13 am #745702Hi,
Could you please provide a link to the page with the search bar? You can use columns to center align an object. For example, insert three 1/3 columns then add the text block inside the middle or second column.
Best regards,
IsmaelFebruary 13, 2017 at 8:54 pm #746608Hello,
I had tried using columns, however I was not able to have the search bar on its own separate layer, so to speak. Therefore, when I had the search bar centered, the background image was also centered (which I want), but it was only taking up the middle column’s width. I am trying to have the background image take up the entire background, and on top of that (overlaying it), I’d like the large, centered search bar.Is this possible to achieve using columns?
Thanks again
February 15, 2017 at 6:32 am #747285Hi!
Insert a color section, apply the background image to it then move the columns with the search bar inside.
Regards,
IsmaelFebruary 15, 2017 at 8:42 pm #747653Ah yes! Perfect!
My mistake was using Grid Rows, instead of Color Section.
Thank you very much!However, I still cannot enlarge the search bar. I gave it a custom class,
so I’m able to center it within the column, but it seems to only get centered if I give it a width of 300px, nothing else seems to work.And whether I have large columns or small columns, it’s still remaining the same size… Ideally I would like it to be around twice the width it currently is.
Any ideas?
- This reply was modified 7 years, 9 months ago by darryllevine.
February 15, 2017 at 9:35 pm #747681Hi
Can you please share us your web site, like asked before, so we can be able to take a look?
We would appreciateRegards,
Basilis -
AuthorPosts
- You must be logged in to reply to this topic.