- This topic has 8 replies, 4 voices, and was last updated 3 years, 1 month ago by Tom.
-
AuthorPosts
-
February 23, 2021 at 12:29 am #1668745milan
Hello,
Iam using GP Premium 1.12.3 and I would like to place some search icon to search field in widget in my theme.
Iam also using Fontawesome, loaded from CDN and I would like to use some of these icons or any other icon.
How to create this search field with this icon, like in this attachment?
Thanks for help.February 23, 2021 at 12:31 am #1668748milanAttachment here: https://www.imgup.cz/image/kFZb
February 23, 2021 at 2:24 am #1668840DavidStaffCustomer SupportHi there,
if you’re site Customizer > General > Structure is set to Flexbox then thats how the default Search Widget will display.
February 23, 2021 at 3:30 am #1668904milanIam using Floats, because there are some problems with css styles…
February 23, 2021 at 4:02 am #1668934DavidStaffCustomer SupportWhat issues are you having with the Flex option enabled ?
February 23, 2021 at 9:33 am #1669482milanSo it is a little bit long story. But I have been moving my old theme to this one GP in my sites https://north-vietnam.com/ and https://severni-vietnam.cz/. This theme is fine, fast, everything is good, but in this process of moving to this theme, there have been various problems in my CSS (not styles in this theme). I try to change my very old theme to Flex structure in GP, but in Flex there have been various bad placing of my images, formating of texts, bad positions of images… But I tried to move to Float structure and there have been almost everything fine. Now Iam in Float structure, I tried to move this structure to Flex, and again the same problems by Css style… (e.g. different styling of images in css styles, bad position of search bar in navigation…)
Iam not sure, but what is better Flex or Float structure? Sorry Iam not a professional developer…
February 23, 2021 at 5:50 pm #1669992ElvinStaffCustomer SupportHi there,
Flexbox is definitely recommended over floats as float layout method is pretty old.
The more modern way of doing layout is usually a mix of Flexbox + Grid. (Flex for content alignment, Grid for general page layout). It’s definitely better in the long run over the legacy method (floats).
February 24, 2021 at 1:50 am #1670327milanOk, thanks, I will try to change it to Flexbox.
And in the Float structure it is not possible to add this icon by Fontawesome?February 24, 2021 at 10:44 am #1671043TomLead DeveloperLead DeveloperHi there,
It is possible, but it would require overwriting the
searchform.php
template file in your child theme: https://github.com/tomusborne/generatepress/blob/3.0.2/searchform.phpThat way you could add the Font Awesome icon directly into the search button. It would also require some custom CSS which we’d be happy to help with when you get the above done.
-
AuthorPosts
- You must be logged in to reply to this topic.