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

    #1212950

    Hey 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,
    Mike

    #1214398

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

    #1215203

    Hi,
    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,
    Mike

    #1215266

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

    #1215593

    Hi,
    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,
    Mike

    #1215756

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

    #1215778

    Hi,
    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,
    Mike

    #1215841

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

    #1215865

    Hi,
    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,
    Mike

    #1215875

    Hi Mike,
    Everything is ok now!
    Thanks a lot for your help :-)

    #1215890

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

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Editing search dropdown’ is closed to new replies.