‘post’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => 5, ‘s’ => sanitize_text_field($tag) ]); foreach ($results as $post) { if (!in_array($post->ID, $unique_ids)) { $posts[] = $post; $unique_ids[] = $post->ID; } } } } // Fallback to focus keyword if ( empty($posts) && !empty($generated['focus_keyword']) ) { $results = get_posts([ 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 5, 's' => sanitize_text_field( $generated['focus_keyword'] ) ]); foreach ($results as $post) { if (!in_array($post->ID, $unique_ids)) { $posts[] = $post; $unique_ids[] = $post->ID; } } } // Final fallback if (empty($posts)) { $posts = get_posts([ 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 5, 'orderby' => 'date', 'order' => 'DESC' ]); } return array_slice($posts, 0, 5); } function stai_insert_internal_links($article, $generated) { links=stai_g et_i nternal_l inks(generated); if (empty($links)) { return $article; } $html = "\n\n"; $html .= '

Related Articles

'; $html .= ''; return $article . $html; } Comments on: Prior to ‘pran pratishtha’ on Jan 22, PM Modi starts 11-day special puja, seeks people’s blessings https://www.sarkaritel.com/prior-to-pran-pratishtha-on-jan-22-pm-modi-starts-11-day-special-puja-seeks-peoples-blessings/ India Government News, PSU & Policy Updates Fri, 12 Jan 2024 06:33:45 +0000 hourly 1 https://wordpress.org/?v=7.0