Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1366188

    I am trying to figure out how to control the look and feel of the Search Results, for WooCommerce products. Obviously, I can do some things in CSS, but I am finding that it is pulling the full content of the product information, which by default shows all of the attributes and lots of other minor meta information. I have had success removing some of that, but am running into issues in that it is not parsing Enfold shortcodes like buttons.

    Is there an easy way to turn on the parsing for Search Results?

    Even better, is there a way to completely control the way search results are displayed?

    Thank you for any suggestions or guidance!

    -jason

    #1366227

    Hey Jason,
    Thank you for the link to your page, I see the button shortcode in the search results and the only way I could recreate this on my test site was to add the button shortcode to a product short description:
    2022-09-24_003.jpg
    so I assume this is what you have done, to enable the shortcode here try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    add_filter( 'the_excerpt', 'do_shortcode');

    this worked in my test:
    2022-09-24_150105.jpg

    Best regards,
    Mike

    #1366273

    That works perfectly, Mike!

    Could that be considered for inclusion within an update? It i hard to think of a reason why a shortcode should not be parsed in a displayable field, at lest in our opinion.

    Thank you!

    #1366274

    Also, is there a way to better control the look and feel of the Search Results page itself? I would like to turn off the side bar for that, but am not sure where those settings re being pulled from.

    #1366282

    Hi,
    The sidebar for the search result page is set to the Enfold Theme Options ▸ Sidebar Settings ▸ Sidebar On Pages but I assume that you don’t want to disable the sidebar on all of your pages, so try this css:

    #top.search-results #main .sidebar {
    	display: none;
    }
    #top.search-results #main .container .av-content-small.units {
        width: 100%;
    }
    #top.search-results #main .author-extra-border {
        right: auto;
        left: -100%;
    }
    #top.search-results #main .container .content.template-search {
    	border: none;
    }

    After applying the css, please clear your browser cache and check.

    Best regards,
    Mike

    #1367154

    Thank you, Mike!

    #1367158

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Customizing Search Results, Particularly in WooCommerce Products’ is closed to new replies.