Okay
  Public Ticket #350260
Search Results
Closed

Comments

  • Jacob started the conversation

    I would like to know how to change the predictive search results to only show products (not blog posts, pages, etc).  I have already been able to update the results that are listed after clicking search to show only products, but the predictive search results still show all content.  Also would like to know how to change the search results so 4 items appear per row (ie 4 columns) when browser size is above 1000px.  Currently 3 items per row are appearing.  Thinking this must be a modification to isotope.min.js ? (css shows transform: translate(0px,339px) for the forth item which is in the second row.  When I change it in firebug/inspect to (750px,0px) it moves it to the forth item in the first row.  There is also a blank result showing in the last row.

    Thanks for any help you can provide!

  •  8,849
    Tahir replied

    Hey!

    See screenshot: http://prntscr.com/5rx4vu . You need to edit this file: "salient\nectar\assets\functions\ajax-search\wp-search-suggest.php" . 

    Thanks 


    ThemeNectar Support Team 

  • Jacob replied

    Thank you Tahir for pointing me to the correct file to update.  I updated the following line of code to display only "products":

    $search_array = array(

        's'=> $search_term,

        'showposts' => $show_postsnum,

        // 'post_type' => 'any',

        'post_type' => 'product',

        'post_status' => 'publish',

        'post_password' => '',

        'suppress_filters' => true

    );

    Are you aware of a way that I can omit specific products based upon their category?

    Thank you for your help!

    Jacob

  • Jacob replied

    Regarding my other question about 4 items per row on the search results page (currently only showing 3/row), I'm trying to update the search.php code without any luck.  I'm using a child theme so I've already copied search.php to my child theme folder.  Are you aware of the changes necessary to show 4 items per row?

  •  8,849
    Tahir replied

    Hey Again!

    Sorry but i dont have any clue. 

    Best,

    -T


    ThemeNectar Support Team 

  • Vinicius replied

    How do you able to update the results that are listed after clicking search to show only products?

  •  8,849
    Tahir replied

    Hey Again,

    Try using this plugin: https://wordpress.org/plugins/search-everything/ .

    Thanks


    ThemeNectar Support Team