| @@ -224,9 +224,9 @@ | ||
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | public function content( $attr, $noAjax ) { |
| 227 | 227 | $attr = wp_parse_args( $attr, $this->get_attributes() ); |
| 228 | - global $unique_ID; | |
| 228 | + global $ultp_unique_ID; | |
| 229 | 229 | |
| 230 | 230 | if ( ! $noAjax ) { |
| 231 | 231 | $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' ); |
| 232 | 232 | $attr['paged'] = $paged ? $paged : 1; |
| @@ -231,9 +231,9 @@ | ||
| 231 | 231 | $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' ); |
| 232 | 232 | $attr['paged'] = $paged ? $paged : 1; |
| 233 | 233 | } |
| 234 | 234 | if ( $attr['queryUnique'] && isset( $attr['savedQueryUnique'] ) ) { |
| 235 | - $unique_ID = $attr['savedQueryUnique']; | |
| 235 | + $ultp_unique_ID = $attr['savedQueryUnique']; | |
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | $block_name = 'post-grid-6'; |
| 239 | 239 | $vid_icon_redirect = true; // Its used for video icon do not remove it |
| @@ -245,9 +245,9 @@ | ||
| 245 | 245 | $dummy_url = ULTP_URL . 'assets/img/ultp-fallback-img.png'; |
| 246 | 246 | |
| 247 | 247 | // Loadmore and Unique content |
| 248 | 248 | if ( $attr['queryUnique'] && isset( $attr['loadMoreQueryUnique'] ) && $attr['paginationShow'] && ( $attr['paginationType'] == 'loadMore' ) ) { |
| 249 | - $unique_ID = $attr['loadMoreQueryUnique']; | |
| 249 | + $ultp_unique_ID = $attr['loadMoreQueryUnique']; | |
| 250 | 250 | $current_unique_posts = $attr['ultp_current_unique_posts']; |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | $attr['className'] = isset( $attr['className'] ) && $attr['className'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['className'] ) : ''; |
| @@ -314,9 +314,9 @@ | ||
| 314 | 314 | |
| 315 | 315 | include ULTP_PATH . 'blocks/template/category.php'; |
| 316 | 316 | |
| 317 | 317 | if ( $attr['queryUnique'] ) { |
| 318 | - $unique_ID[ $attr['queryUnique'] ][] = $post_id; | |
| 318 | + $ultp_unique_ID[ $attr['queryUnique'] ][] = $post_id; | |
| 319 | 319 | $current_unique_posts[] = $post_id; |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | $post_loop .= '<' . $attr['contentTag'] . ' class="ultp-block-item post-id-' . $post_id . ' ultp-block-item-' . $idx . ( $attr['titleAnimation'] ? ' ultp-animation-' . $attr['titleAnimation'] : '' ) . '">'; |
| @@ -418,9 +418,9 @@ | ||
| 418 | 418 | $post_loop .= '</' . $attr['contentTag'] . '>'; |
| 419 | 419 | ++$idx; |
| 420 | 420 | endwhile; |
| 421 | 421 | if ( $attr['queryUnique'] ) { |
| 422 | - $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>'; | |
| 422 | + $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>'; | |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | 425 | // if ( $attr['advPaginationEnable'] && ($attr['paginationType'] == 'loadMore')) { |
| 426 | 426 | // $wraper_after .= '<span class="ultp-loadmore-insert-before"></span>'; |
| @@ -436,9 +436,9 @@ | ||
| 436 | 436 | $wraper_after .= '</div>'; |
| 437 | 437 | $wraper_after .= $pagi_block_html; |
| 438 | 438 | $wraper_after .= '</div>'; |
| 439 | 439 | |
| 440 | - wp_reset_query(); | |
| 440 | + wp_reset_postdata(); | |
| 441 | 441 | } else { |
| 442 | 442 | $wraper_before .= ultimate_post()->get_no_result_found_html( $attr['notFoundMessage'] ); |
| 443 | 443 | } |
| 444 | 444 | |