Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #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 you

    #743375

    Hey!

    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,
    Yigit

    #743428

    Hello,
    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 you

    #743430

    Hey!

    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!
    Yigit

    #743460

    Excellent!
    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.
    #745701

    Hi,

    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,
    Vinay

    #745702

    Hi,

    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,
    Ismael

    #746608

    Hello,
    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

    #747285

    Hi!

    Insert a color section, apply the background image to it then move the columns with the search bar inside.

    Regards,
    Ismael

    #747653

    Ah 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.
    #747681

    Hi

    Can you please share us your web site, like asked before, so we can be able to take a look?
    We would appreciate

    Regards,
    Basilis

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.