Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1116587

    Hi Enfold team,

    When you search, there s always an Ajax quick result below the search field. In here the results are sorted by post type (Like Posts, Portfolio-items, etc.)
    When you hit enter or go to ‘See all results’ you go to the search results page. Here the results are in a numbered list.

    I would love to sort the results also by post type here, just like the Ajax result.
    What would be the best way to do this.

    Thanks in advance,
    Ariane

    #1116982

    Hey ariane1001,

    Thank you for using Enfold.

    This is possible but it’s going to require major modification of the includes > loop-search.php file, which is beyond the scope of support. You may need to hire a freelance developer or contact our partner, Codeable.

    // https://kriesi.at/contact/customization

    Best regards,
    Ismael

    #1116992

    Hi Ismael,
    Thanks for your reply. I will try it myself first in my child theme.

    includes > loop-search.php I did find allready but where is the Ajax search result code located in the theme?

    Thanks again,
    Regards,
    Ariane

    #1117647

    Hi,

    The AJAX search is inside the functions-enfold.php file. You’ll find the post type sorting around line 282.
    It basically loops through every posts and regroup them based on post types in an array called $sorted.

    Best regards,
    Ismael

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