Skip to content

Commit

Permalink
Fixed search result issse (sovware#1264)
Browse files Browse the repository at this point in the history
  • Loading branch information
kowsar89 authored Nov 14, 2022
1 parent fdb209e commit 376d25d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion includes/model/Listings.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ public function __construct( $atts = array(), $type = 'listing', $query_args = f

$this->set_options();

if ( 'search_result' == $this->type ) {
$current_page = !empty( $this->atts['_current_page'] ) ? $this->atts['_current_page'] : '';

if ( 'search_result' === $this->type || ( 'instant_search' == $this->type && 'search_result' === $current_page ) ) {
$this->update_search_options();
}

Expand Down Expand Up @@ -1714,6 +1716,7 @@ public function get_wrapper_class( $class = '' ) {
}

public function data_atts() {
$this->atts['_current_page'] = $this->type; // search_result or listing
// Separates class names with a single space, collates class names for wrapper tag element.
echo 'data-atts="' . esc_attr( json_encode( $this->atts ) ) . '"';
}
Expand Down

0 comments on commit 376d25d

Please sign in to comment.