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