-
AuthorPosts
-
May 6, 2020 at 11:43 pm #1210547
Hi,
For my main menu search results, I already added some CSS found on the forum to hide products excerpts:
.header_color .ajax_search_excerpt {display: none;}
(see screenshot in private content)Now I would need to replace them by products prices.
I was told to modify the avia_ajax_search function in the functions-enfold.php file, but I would prefer to add a function in the functions.php file of my child theme, so it will be independent of any theme update.
Which function do i need to add?On the other hand, I would like to align products titles and prices to the left.
Which CSS do I need to add to achieve this?If needed, you can find a link and credentials to my website in private content.
Thanks a lot!
May 14, 2020 at 1:53 pm #1212950Hey fcp,
Sorry for the late reply, to add the custom search function to your child theme you can copy the full function from the functions-enfold.php file into your child theme functions.php, 194 lines.
Although, I didn’t find a way to add the price to the Ajax search results.
The only solution I found was to replace the search with the product search.
I did find a working example of Add Product Price in WooCommerce as a Shortcode I was hoping it could be added to the search results, but it doesn’t work for that.Best regards,
MikeMay 19, 2020 at 6:45 pm #1214398Hi Mike,
Thanks for your reply.
I think i will put this problem aside for now.Could you only tell me how to align products titles to the left in search results, please?
Thanks a lot!
May 22, 2020 at 11:20 am #1215203Hi,
Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:.ajax_search_response .av_ajax_search_content { text-align: left !important; }
After applying the css, Please clear your browser cache and check.
Best regards,
MikeMay 22, 2020 at 4:05 pm #1215266Hi Mike,
Your code works great!
I added some CSS to increase the padding between thumbnails and titles.Now the last thing I need to achieve is to align titles vertically. You could find a mockup in private content.
Which code do I need to add?Thanks a lot!
May 23, 2020 at 10:18 pm #1215593Hi,
Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:span.av_ajax_search_content { padding-top: 10px; }
After applying the css, Please clear your browser cache and check.
Best regards,
MikeMay 24, 2020 at 2:11 pm #1215756Hi Mike,
Thanks for your reply.
Unfortunately, this code doesn’t align texts vertically, but only move them all to the bottom.
So, when title is 2 lines, it’s also moved to the bottom and the result is not centered (see screenshot).
What I really need is texts centered in their own cell.
Which code do I need to add to achieve this?
Thanks a lot!May 24, 2020 at 3:18 pm #1215778Hi,
Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:.ajax_search_response a.av_ajax_search_entry.with_image { display: flex !important; text-align: center !important; align-items: center !important; }
After applying the css, Please clear your browser cache and check.
Best regards,
MikeMay 24, 2020 at 6:02 pm #1215841Hi Mike,
Thanks for your reply.
This is better with this code, but now titles are not aligned on the left anymore (see screenshot).
Any idea?
Thanks a lot!May 24, 2020 at 7:48 pm #1215865Hi,
The titles are aligned left, but when the title has two lines it needs to have the overflow set to visible.
Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:.av_ajax_search_image { overflow: visible !important; }
other than that the images have a right margin and the titles have a left padding.
After applying the css, Please clear your browser cache and check.Best regards,
MikeMay 24, 2020 at 9:56 pm #1215875Hi Mike,
Everything is ok now!
Thanks a lot for your help :-)May 25, 2020 at 12:23 am #1215890Hi,
Glad we were able to help, we will close this now. Thank you for using Enfold.For your information, you can take a look at Enfold documentation here
For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)Best regards,
Mike -
AuthorPosts
- The topic ‘Editing search dropdown’ is closed to new replies.