Okay
  Public Ticket #1136987
Ajax Search Results
Closed

Comments

  •  2
    Noaviv started the conversation

    Hello,

    I was wondering if it is possible to adjust the number of results returned in the Ajax results in the screen overlay and also if it is possible to split these into columns.

    thank you!
    Lori

  •  3,030
    Andrew replied

    Hi Noaviv,

    Thanks for contacting us regarding your query.

    If you should option the functions.php file and scroll to lines 1826-1840 you will locate the code that is responsible for the search results amount. Please change the posts_per_page = 12 to the amount you would like.

    In regards to splitting this into 2 columns, this is a more advanced customization that falls outside of our support.

    Here are three (3) highly recommended agencies that cater to WordPress customizations.

    #-----------------------------------------------------------------#
    # Search related 
    #-----------------------------------------------------------------#
    if(!function_exists('change_wp_search_size')){
        function change_wp_search_size($query) {
            if ( $query->is_search ) 
                $query->query_vars['posts_per_page'] = 12; 
            return $query; 
        }
    }
    if(!is_admin()) {
        add_filter('pre_get_posts', 'change_wp_search_size');
    }
    

    Please let me know if there are any more questions that I may answer for you.

    Cheers!