| @@ -18,8 +18,9 @@ | ||
| 18 | 18 | // -------------------------- |
| 19 | 19 | // Layout |
| 20 | 20 | // -------------------------- |
| 21 | 21 | 'layout' => 'layout1', |
| 22 | + 'infiniteScroll' => false, | |
| 22 | 23 | |
| 23 | 24 | // -------------------------- |
| 24 | 25 | // Query Setting |
| 25 | 26 | // -------------------------- |
| @@ -224,9 +225,9 @@ | ||
| 224 | 225 | } |
| 225 | 226 | |
| 226 | 227 | public function content( $attr, $noAjax ) { |
| 227 | 228 | $attr = wp_parse_args( $attr, $this->get_attributes() ); |
| 228 | - global $unique_ID; | |
| 229 | + global $ultp_unique_ID; | |
| 229 | 230 | |
| 230 | 231 | if ( ! $noAjax ) { |
| 231 | 232 | $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' ); |
| 232 | 233 | $attr['paged'] = $paged ? $paged : 1; |
| @@ -231,9 +232,9 @@ | ||
| 231 | 232 | $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' ); |
| 232 | 233 | $attr['paged'] = $paged ? $paged : 1; |
| 233 | 234 | } |
| 234 | 235 | if ( $attr['queryUnique'] && isset( $attr['savedQueryUnique'] ) ) { |
| 235 | - $unique_ID = $attr['savedQueryUnique']; | |
| 236 | + $ultp_unique_ID = $attr['savedQueryUnique']; | |
| 236 | 237 | } |
| 237 | 238 | |
| 238 | 239 | $block_name = 'post-grid-4'; |
| 239 | 240 | $vid_icon_redirect = true; // Its used for video icon do not remove it |
| @@ -245,9 +246,9 @@ | ||
| 245 | 246 | $dummy_url = ULTP_URL . 'assets/img/ultp-fallback-img.png'; |
| 246 | 247 | |
| 247 | 248 | // Loadmore and Unique content |
| 248 | 249 | if ( $attr['queryUnique'] && isset( $attr['loadMoreQueryUnique'] ) && $attr['paginationShow'] && ( $attr['paginationType'] == 'loadMore' ) ) { |
| 249 | - $unique_ID = $attr['loadMoreQueryUnique']; | |
| 250 | + $ultp_unique_ID = $attr['loadMoreQueryUnique']; | |
| 250 | 251 | $current_unique_posts = $attr['ultp_current_unique_posts']; |
| 251 | 252 | } |
| 252 | 253 | |
| 253 | 254 | $attr['className'] = isset( $attr['className'] ) && $attr['className'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['className'] ) : ''; |
| @@ -316,9 +317,9 @@ | ||
| 316 | 317 | |
| 317 | 318 | include ULTP_PATH . 'blocks/template/category.php'; |
| 318 | 319 | |
| 319 | 320 | if ( $attr['queryUnique'] ) { |
| 320 | - $unique_ID[ $attr['queryUnique'] ][] = $post_id; | |
| 321 | + $ultp_unique_ID[ $attr['queryUnique'] ][] = $post_id; | |
| 321 | 322 | $current_unique_posts[] = $post_id; |
| 322 | 323 | } |
| 323 | 324 | |
| 324 | 325 | $post_loop .= '<' . $attr['contentTag'] . ' class="ultp-block-item post-id-' . $post_id . ( $attr['titleAnimation'] ? ' ultp-animation-' . $attr['titleAnimation'] : '' ) . '">'; |
| @@ -415,9 +416,9 @@ | ||
| 415 | 416 | $post_loop .= '</' . $attr['contentTag'] . '>'; |
| 416 | 417 | ++$idx; |
| 417 | 418 | endwhile; |
| 418 | 419 | if ( $attr['queryUnique'] ) { |
| 419 | - $post_loop .= "<span style='display: none;' class='ultp-current-unique-posts' data-ultp-unique-ids= " . wp_json_encode( $unique_ID ) . ' data-current-unique-posts= ' . wp_json_encode( $current_unique_posts ) . '> </span>'; | |
| 420 | + $post_loop .= "<span style='display: none;' class='ultp-current-unique-posts' data-ultp-unique-ids= " . wp_json_encode( $ultp_unique_ID ) . ' data-current-unique-posts= ' . wp_json_encode( $current_unique_posts ) . '> </span>'; | |
| 420 | 421 | } |
| 421 | 422 | |
| 422 | 423 | // if ( $attr['advPaginationEnable'] && ($attr['paginationType'] == 'loadMore')) { |
| 423 | 424 | // $wraper_after .= '<span class="ultp-loadmore-insert-before"></span>'; |
| @@ -433,9 +434,9 @@ | ||
| 433 | 434 | $wraper_after .= '</div>'; |
| 434 | 435 | $wraper_after .= $pagi_block_html; |
| 435 | 436 | $wraper_after .= '</div>'; |
| 436 | 437 | |
| 437 | - wp_reset_query(); | |
| 438 | + wp_reset_postdata(); | |
| 438 | 439 | } else { |
| 439 | 440 | $wraper_before .= ultimate_post()->get_no_result_found_html( $attr['notFoundMessage'] ); |
| 440 | 441 | } |
| 441 | 442 | |