// Function to prevent duplicate posts and handle offset across pagination function prevent_smartmag_widget_duplicates($args) { // Define a unique cache key based on the current query context $cache_key = 'displayed_post_ids_' . get_query_var('paged', 1); // Get the stored displayed post IDs from the transient $cached_displayed_post_ids = get_transient($cache_key); if ($cached_displayed_post_ids === false) { $cached_displayed_post_ids = []; } // Static array to track posts displayed on the current page static $displayed_post_ids = []; // Combine cached IDs and local IDs $all_displayed_post_ids = array_merge($cached_displayed_post_ids, $displayed_post_ids); // Handle offset manually if specified if (!empty($args['offset'])) { $manual_offset = $args['offset']; unset($args['offset']); // Remove native offset handling // Perform a query to consume posts for the offset $temp_args = $args; $temp_args['posts_per_page'] = $manual_offset; // Exclude posts already tracked if (!empty($all_displayed_post_ids)) { $temp_args['post__not_in'] = array_merge( $temp_args['post__not_in'] ?? [], $all_displayed_post_ids ); } $temp_query = new WP_Query($temp_args); // Add the IDs of offset posts to the displayed lists if (!empty($temp_query->posts)) { foreach ($temp_query->posts as $post) { $displayed_post_ids[] = $post->ID; $cached_displayed_post_ids[] = $post->ID; } } wp_reset_postdata(); // Clean up after offset query } // Exclude posts that have already been displayed if (!empty($all_displayed_post_ids)) { $args['post__not_in'] = array_merge( $args['post__not_in'] ?? [], $all_displayed_post_ids ); } // Execute the final query $query = new WP_Query($args); // Add the IDs of fetched posts to the displayed lists if (!empty($query->posts)) { foreach ($query->posts as $post) { $displayed_post_ids[] = $post->ID; $cached_displayed_post_ids[] = $post->ID; } } // Save the updated cache (transient expires in 10 minutes) set_transient($cache_key, $cached_displayed_post_ids, 10 * MINUTE_IN_SECONDS); return $args; } // Hook the function into SmartMag's widget query filter add_filter('bunyad_block_query_args', 'prevent_smartmag_widget_duplicates'); WWE SmackDown Viewership Is In As Build Continues For SummerSlam
[show_primary_category]

WWE brought another episode of SmackDown for fans this week, they continued the build toward SummerSlam, although they didn’t add any matches to the card. There was still a lot of action as WWE reminded fans throughout the show that SmackDown will air on FS1 next week.

Click here for our complete coverage of WWE SmackDown this week.

Programming Insider reports that the July 14th episode of WWE SmackDown brought in an overnight average of 2.157 million viewers, with a .54 in the 18 to 49 demographic.

This week’s smackdown featured a fatal four-way match with the United States Title in play. Santos Escobar won that match, so he will face the winner of next week’s fatal four-way match. Jey Uso was all by himself on SmackDown this week, but next week will see him have another face-to-face with the Tribal Chief Roman Reigns.

Advertising
Advertising

The July 7th episode of WWE SmackDown brought in an overnight viewership of 2.375 million, with a .7 in the 18 to 49 demographic. That was their Money in the Bank fallout, and the Bloodline’s segment got over 30 minutes to kick off the broadcast.

The June 30th episode of WWE SmackDown brought in an overnight average of 2,510,000 viewers, with a .69 in the 18 to 49 demographic.

WWE has a lot of things going on for the SmackDown brand, but what excites you most? Sound off in the comments to let us know what you’re thinking!

Felix Upton

Felix Upton is a seasoned writer with over 30 years of experience. He began his career writing advertisements for local newspapers in New York before transitioning to publishing news for Ringside News. His expertise includes writing, editing, research, photo editing, and video editing. In his free time, he enjoys bungee jumping and learning extinct languages.

Disqus Comments Loading...