slug; if ($blog_reflection_latest_blog_post_get_latest_post_only == 'latest') { // Define query arguments $latest_blog_post_args_latest = array( 'post_status' => 'publish', 'post_type' => 'post', 'posts_per_page' => $blog_reflection_latest_blog_post_display_control, 'order' => $blog_reflection_latest_blog_post_order, // Use the selected order 'orderby' => $blog_reflection_latest_blog_post_order_by, // Use the selected order by 'ignore_sticky_posts' => 1, ); $latest_blog_post_query = new WP_Query($latest_blog_post_args_latest); } else { // The Query for Trending Stories $latest_blog_post_args_cat = array( 'post_type' => 'post', 'posts_per_page' => $blog_reflection_latest_blog_post_display_control, 'order' => $blog_reflection_latest_blog_post_order, // Use the selected order 'orderby' => $blog_reflection_latest_blog_post_order_by, // Use the selected order by 'category_name' => $blog_reflection_latest_blog_post_category_slug, 'ignore_sticky_posts' => 1, ); $latest_blog_post_query = new WP_Query($latest_blog_post_args_cat); } if ($latest_blog_post_query->have_posts()) { $tempCount = 1; while ($latest_blog_post_query->have_posts()) { $latest_blog_post_query->the_post(); // Get the categories of the specific post $latest_blog_post_categories = get_the_category(); if (!empty($latest_blog_post_categories)) { // Assuming only one category per post $latest_blog_post_category = $latest_blog_post_categories[0]; // Selecting the first category // Get category link and color $blog_reflection_latest_blog_post_category_link = get_category_link($latest_blog_post_category->term_id); $latest_blog_post_custom_field_cat_color = get_term_meta($latest_blog_post_category->term_id, 'term_color', true); // Example: Get random color for post tag $latest_blog_post_tag_colors = array( 'style-dark-green', 'style-red', 'style-blue' ); $random_color = $latest_blog_post_tag_colors[array_rand($latest_blog_post_tag_colors)]; $latest_blog_post_categories = $latest_blog_post_category->name; } else { $blog_reflection_latest_blog_post_category_link = ''; $latest_blog_post_custom_field_cat_color = ''; $latest_blog_post_categories = ''; } $blog_reflection_post_thumbnail_id = get_post_thumbnail_id(get_the_ID()); if (get_the_post_thumbnail_url()) { $blog_reflection_latest_blog_post_image_alt_text = get_post_meta($blog_reflection_post_thumbnail_id, '_wp_attachment_image_alt', true); } else { $blog_reflection_latest_blog_post_image_alt_text = 'No Image'; } // Get post image URL $latest_blog_post_img = (get_the_post_thumbnail_url(null, 'large')) ? get_the_post_thumbnail_url(null, 'large') : get_template_directory_uri() . '/assets/images/no-image.jpg'; if (strlen(get_the_title()) > 5) { // Trim to the first 5 characters and add ellipsis $blog_reflection_latest_blog_post_title = substr(get_the_title(), 0, 20) . '...'; } else { // If the title is less than or equal to 5 characters, display it as is $blog_reflection_latest_blog_post_title = get_the_title(); } if (strlen(get_the_excerpt()) > 78) { // Trim to the first 5 characters and add ellipsis $blog_reflection_latest_blog_post_excerpt = substr(get_the_excerpt(), 0, 65) . '...'; } else { // If the title is less than or equal to 5 characters, display it as is $blog_reflection_latest_blog_post_excerpt = get_the_excerpt(); } if ($tempCount <= 6) { ?>
$blog_reflection_popular_news_category) { $tab_id = 'nav-tab-wrap' . ($index + 1); ?>
'post', 'posts_per_page' => 1, 'cat' => $blog_reflection_popular_news_category->term_id, ]; $blog_reflection_most_popular_news_category_link = get_category_link($blog_reflection_popular_news_category->term_id); $blog_reflection_popular_news_query = new WP_Query($blog_reflection_popular_news_post_args); if ($blog_reflection_popular_news_query->have_posts()) { while ($blog_reflection_popular_news_query->have_posts()) { $blog_reflection_popular_news_query->the_post(); $blog_reflection_popular_post_img = (get_the_post_thumbnail_url(null, 'large')) ? get_the_post_thumbnail_url(null, 'large') : get_template_directory_uri() . '/assets/images/no-image.jpg'; // Get the post thumbnail ID $blog_reflection_post_thumbnail_id = get_post_thumbnail_id(get_the_ID()); if (get_the_post_thumbnail_url()) { $blog_reflection_image_alt_text = get_post_meta($blog_reflection_post_thumbnail_id, '_wp_attachment_image_alt', true); } else { $blog_reflection_image_alt_text = 'No Image'; } if (strlen(get_the_title()) > 5) { // Trim to the first 5 characters and add ellipsis $blog_reflection_most_popular_post_title = substr(get_the_title(), 0, 20) . '...'; } else { // If the title is less than or equal to 5 characters, display it as is $blog_reflection_most_popular_post_title = get_the_title(); } ?>
<?php echo esc_attr($blog_reflection_image_alt_text) ?>

'publish', 'post_type' => 'post', 'posts_per_page' => 7, 'cat' => $blog_reflection_popular_news_category->term_id, 'ignore_sticky_posts' => 1, ]; $blog_reflection_most_popular_news_category_link = get_category_link($blog_reflection_popular_news_category->term_id); $blog_reflection_popular_news_query = new WP_Query($blog_reflection_popular_news_post_args_2nd); $i = 0; if ($blog_reflection_popular_news_query->have_posts()) { while ($blog_reflection_popular_news_query->have_posts()) { $blog_reflection_popular_news_query->the_post(); $popular_news_post_img = (get_the_post_thumbnail_url(null, 'thumbnail')) ? get_the_post_thumbnail_url(null, 'thumbnail') : get_template_directory_uri() . '/assets/images/no-image.jpg'; // Get the post thumbnail ID $popular_news_post_thumbnail_id = get_post_thumbnail_id(get_the_ID()); if (get_the_post_thumbnail_url()) { $popular_news_image_alt_text = get_post_meta($popular_news_post_thumbnail_id, '_wp_attachment_image_alt', true); } else { $popular_news_image_alt_text = 'No Image'; } // Example: Get random color for post tag $trending_tag_colors = array( 'style-dark-green', 'style-red', 'style-blue' ); $random_color = $trending_tag_colors[array_rand($trending_tag_colors)]; if (strlen(get_the_title()) > 5) { // Trim to the first 5 characters and add ellipsis $blog_reflection_most_popular_bottom_post_title = substr(get_the_title(), 0, 20) . '...'; } else { // If the title is less than or equal to 5 characters, display it as is $blog_reflection_most_popular_bottom_post_title = get_the_title(); } $i++; if ($i != 1) { ?>
= 6) { break; } } } ?>
<?php the_title_attribute() ?>


array( array( 'key' => 'video_url', 'value' => '', // Checks for a non-empty value 'compare' => '!=' // Not equal to an empty string ) ), 'category__in' => $blog_reflection_video_post_category, 'order' => $blog_reflection_video_order, 'orderby' => $blog_reflection_video_orderby, 'posts_per_page' => $blog_reflection_video_post_number, 'ignore_sticky_posts' => 1, ); $blog_reflection_video_post_query = new WP_Query($blog_reflection_video_post_args); ?>
have_posts()) : while ($blog_reflection_video_post_query->have_posts()) : $blog_reflection_video_post_query->the_post(); $blog_reflection_get_video_url = get_post_meta(get_the_ID(), 'video_url', true); $blog_reflection_video_post_category = get_the_category(); $cat_url = get_category_link($blog_reflection_video_post_category[0]->term_id); $blog_reflection_tag_color = array('style-dark-green', 'style-red', 'style-blue'); // Example colors, adjust as needed // Get the categories of the specific post if (!empty($blog_reflection_video_post_category)) { $custom_field_cat_color = get_term_meta($blog_reflection_video_post_category[0]->term_id, 'term_color', true); $random_color = $blog_reflection_tag_color[array_rand($blog_reflection_tag_color)]; } else { $custom_field_cat_color = ''; } $blog_reflection_video_post_img = (get_the_post_thumbnail_url()) ? get_the_post_thumbnail_url() : get_template_directory_uri() . '/assets/images/no-image.jpg'; $blog_reflection_get_video_icon = get_template_directory_uri() . '/assets/images/wave.svg'; // Get the post thumbnail ID $video_post_image_thumbnail_id = get_post_thumbnail_id(get_the_ID()); if (get_the_post_thumbnail_url()) { $video_post_image_alt_text = get_post_meta($video_post_image_thumbnail_id, '_wp_attachment_image_alt', true); } else { $video_post_image_alt_text = 'No Image'; } // Get post date $post_date = get_the_date('Y-m-d'); // Extract year, month, and day $blog_reflection_video_post_year = get_the_date('Y'); $blog_reflection_video_post_month = get_the_date('m'); $blog_reflection_video_post_day = get_the_date('d'); // Get date URL $date_url = get_day_link($blog_reflection_video_post_year, $blog_reflection_video_post_month, $blog_reflection_video_post_day); if (strlen(get_the_title()) > 5) { // Trim to the first 5 characters and add ellipsis $blog_reflection_video_right_title = substr(get_the_title(), 0, 20) . '...'; } else { // If the title is less than or equal to 5 characters, display it as is $blog_reflection_video_right_title = get_the_title(); } ?>


slug; } // letest post code $blog_reflection_home_one_what_new_get_latest_post_only = get_theme_mod('home_one_what_new_choose_cat_or_latest', 'latest'); if (!$blog_reflection_home_one_what_new_get_latest_post_only) { $blog_reflection_home_one_what_new_get_latest_post_only = 'latest'; } if ($blog_reflection_home_one_what_new_get_latest_post_only == 'latest') { // Define query arguments $home_one_what_new_args_latest = array( 'post_status' => 'publish', 'posts_per_page' => 1, 'order' => 'desc', // Use the selected order 'orderby' => 'date', // Use the selected order by 'ignore_sticky_posts' => 1, ); $home_one_what_new_query = new WP_Query($home_one_what_new_args_latest); } else { // The Query for what's new $home_one_what_new_args_category = array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 1, 'order' => $blog_reflection_home_one_what_new_order, 'orderby' => $blog_reflection_home_one_what_new_order_by, 'category_name' => $blog_reflection_home_one_what_new_category_slug, 'ignore_sticky_posts' => 1, ); $home_one_what_new_query = new WP_Query($home_one_what_new_args_category); } if ($home_one_what_new_query->have_posts()) { while ($home_one_what_new_query->have_posts()) { $home_one_what_new_query->the_post(); // Get random color of post tag $home_one_what_new_tag_colors = array( 'style-dark-green', 'style-red', 'style-blue' ); // Example colors, adjust as needed $random_color = $home_one_what_new_tag_colors[array_rand($home_one_what_new_tag_colors)]; // Get category details by slug $home_one_what_new_post_category = get_category_by_slug($blog_reflection_home_one_what_new_category_slug); if ($home_one_what_new_post_category !== false) { $home_one_what_new_custom_field_cat_color = get_term_meta($home_one_what_new_post_category->term_id, 'term_color', true); $blog_reflection_home_one_what_new_category_link = get_category_link($home_one_what_new_post_category->term_id); } else { $home_one_what_new_custom_field_cat_color = ''; $blog_reflection_home_one_what_new_category_link = ''; } // Get post image URL $home_one_what_new_post_img = (get_the_post_thumbnail_url(null, 'large')) ? get_the_post_thumbnail_url(null, 'large') : get_template_directory_uri() . '/assets/images/no-image.jpg'; $blog_reflection_post_thumbnail_id = get_post_thumbnail_id(get_the_ID()); if (get_the_post_thumbnail_url()) { $blog_reflection_home_one_what_new_image_alt_text = get_post_meta($blog_reflection_post_thumbnail_id, '_wp_attachment_image_alt', true); } else { $blog_reflection_home_one_what_new_image_alt_text = 'No Image'; } if (strlen(get_the_title()) > 5) { // Trim to the first 5 characters and add ellipsis $blog_reflection_what_new_post_title = substr(get_the_title(), 0, 20) . '...'; } else { // If the title is less than or equal to 5 characters, display it as is $blog_reflection_what_new_post_title = get_the_title(); } ?>
<?php echo esc_attr($blog_reflection_home_one_what_new_image_alt_text) ?>

slug; } $blog_reflection_home_one_what_new_bottom_cat_or_latest = get_theme_mod('home_one_what_new_bottom_cat_or_latest', 'latest'); if (!$blog_reflection_home_one_what_new_bottom_cat_or_latest) { $blog_reflection_home_one_what_new_bottom_cat_or_latest = 'latest'; } if ($blog_reflection_home_one_what_new_bottom_cat_or_latest == 'latest') { // The Query for what's new $what_new_post_args_latest = array( 'post_status' => 'publish', 'posts_per_page' => 6, 'order' => 'desc', 'orderby' => 'date', 'ignore_sticky_posts' => 1, ); $what_new_post_query = new WP_Query($what_new_post_args_latest); } else { $what_new_post_args_category = array( 'post_status' => 'publish', 'post_type' => 'post', 'posts_per_page' => 6, 'order' => $blog_reflection_what_new_post_order, 'orderby' => $blog_reflection_what_new_post_order_by, 'category_name' => $blog_reflection_what_new_post_category_slug, 'ignore_sticky_posts' => 1, ); $what_new_post_query = new WP_Query($what_new_post_args_category); } if ($what_new_post_query->have_posts()) { while ($what_new_post_query->have_posts()) { $what_new_post_query->the_post(); // Get the category of specific post $what_new_post_category = get_the_category(); $blog_reflection_what_new_post_category_link = get_term_link($what_new_post_category[0]); // Get random color of post tag $tag_colors = array( 'style-dark-green', 'style-red', 'style-blue' ); // Example colors, adjust as needed $random_color = $tag_colors[array_rand($tag_colors)]; // Get post image URL $what_new_post_img = (get_the_post_thumbnail_url(null, 'large')) ? get_the_post_thumbnail_url(null, 'large') : get_template_directory_uri() . '/assets/images/no-image.jpg'; $blog_reflection_post_thumbnail_id = get_post_thumbnail_id(get_the_ID()); if (get_the_post_thumbnail_url()) { $blog_reflection_what_new_image_alt_text = get_post_meta($blog_reflection_post_thumbnail_id, '_wp_attachment_image_alt', true); } else { $blog_reflection_what_new_image_alt_text = 'No Image'; } if (strlen(get_the_title()) > 5) { // Trim to the first 5 characters and add ellipsis $blog_reflection_what_new_bottom_post_title = substr(get_the_title(), 0, 20) . '...'; } else { // If the title is less than or equal to 5 characters, display it as is $blog_reflection_what_new_bottom_post_title = get_the_title(); } ?>


'publish', 'posts_per_page' => 1, 'post__not_in' => $sticky_posts, // Exclude sticky posts ]; $blog_reflection_future_perfect_top_post_query = new WP_Query($future_perfect_top_post_args); } else { $future_perfect_top_post_args = [ 'post_type' => 'post', 'posts_per_page' => 1, 'category__in' => $future_perfect_top_post_cat, 'orderby' => 'post__in', 'order' => 'ASC', 'post__not_in' => $sticky_posts, // Exclude sticky posts ]; $blog_reflection_future_perfect_top_post_query = new WP_Query($future_perfect_top_post_args); } // Fetch the posts // Check if there are posts if ($blog_reflection_future_perfect_top_post_query->have_posts()) : // Loop through the posts while ($blog_reflection_future_perfect_top_post_query->have_posts()) : $blog_reflection_future_perfect_top_post_query->the_post(); $blog_reflection_future_perfect_top_post_categories = get_the_category(); $blog_reflection_future_perfect_post_category_name = !empty($blog_reflection_future_perfect_top_post_categories) ? esc_html($blog_reflection_future_perfect_top_post_categories[0]->name) : esc_html('Uncategorized'); $blog_reflection_future_perfect_post_category_link = !empty($blog_reflection_future_perfect_top_post_categories) ? get_category_link($blog_reflection_future_perfect_top_post_categories[0]->term_id) : '#'; $blog_reflection_future_perfect_top_post_img = (get_the_post_thumbnail_url(null, 'large')) ? get_the_post_thumbnail_url(null, 'large') : get_template_directory_uri() . '/assets/images/no-image.jpg'; $blog_reflection_post_thumbnail_id = get_post_thumbnail_id(get_the_ID()); if (get_the_post_thumbnail_url()) { $blog_reflection_future_perfect_top_image_alt_text = get_post_meta($blog_reflection_post_thumbnail_id, '_wp_attachment_image_alt', true); } else { $blog_reflection_future_perfect_top_image_alt_text = 'No Image'; } if (strlen(get_the_title()) > 5) { // Trim to the first 5 characters and add ellipsis $blog_reflection_future_perfect_post_title = substr(get_the_title(), 0, 20) . '...'; } else { // If the title is less than or equal to 5 characters, display it as is $blog_reflection_future_perfect_post_title = get_the_title(); } ?>
<?php echo esc_attr($blog_reflection_future_perfect_top_image_alt_text) ?>

20) { array_pop($blog_reflection_future_perfect_excerpt_words); $blog_reflection_future_perfect_excerpt = implode(' ', $blog_reflection_future_perfect_excerpt_words) . '...'; } echo esc_html($blog_reflection_future_perfect_excerpt); ?>

'publish', 'post_type' => 'post', 'posts_per_page' => 4, // Only one post 'orderby' => 'date', // Order by date 'order' => 'desc', // Descending order (latest post first) 'post__not_in' => $sticky_posts, ); $blog_reflection_future_perfect_middle_post_query = new WP_Query($blog_reflection_future_perfect_middle_post_args); } else { // The Query $blog_reflection_future_perfect_middle_post_args = array( 'post_type' => 'post', 'category__in' => $blog_reflection_future_perfect_middle_category_id, // Replace with your category ID 'posts_per_page' => $blog_reflection_future_perfect_display_middle_post_number, // Number of posts to display 'orderby' => $blog_reflection_future_perfect_middle_post_order_by, // Order by date 'order' => $blog_reflection_future_perfect_middle_post_order, // Order descending 'post__not_in' => $sticky_posts, ); $blog_reflection_future_perfect_middle_post_query = new WP_Query($blog_reflection_future_perfect_middle_post_args); } // Execute the query // The Loop if ($blog_reflection_future_perfect_middle_post_query->have_posts()) { while ($blog_reflection_future_perfect_middle_post_query->have_posts()) { $blog_reflection_future_perfect_middle_post_query->the_post(); // Get the category color and link $blog_reflection_future_perfect_middle_post_category_name = get_the_category(); if ($blog_reflection_future_perfect_middle_post_category_name !== false) { $blog_reflection_future_perfect_middle_custom_field_cat_color = get_term_meta($blog_reflection_future_perfect_middle_post_category_name[0]->term_id, 'term_color', true); $blog_reflection_future_perfect_middle_post_category_link = get_category_link($blog_reflection_future_perfect_middle_post_category_name[0]->term_id); } $blog_reflection_future_perfect_middle_post_img = (get_the_post_thumbnail_url(null, 'large')) ? get_the_post_thumbnail_url(null, 'large') : get_template_directory_uri() . '/assets/images/no-image.jpg'; $blog_reflection_post_thumbnail_id = get_post_thumbnail_id(get_the_ID()); if (get_the_post_thumbnail_url()) { $blog_reflection_future_perfect_middle_image_alt_text = get_post_meta($blog_reflection_post_thumbnail_id, '_wp_attachment_image_alt', true); } else { $blog_reflection_future_perfect_middle_image_alt_text = 'No Image'; } $blog_reflection_future_perfect_middle_get_index_of_array = array_rand($blog_reflection_tag_color, 1); if (strlen(get_the_title()) > 5) { // Trim to the first 5 characters and add ellipsis $blog_reflection_future_perfect_middle_post_title = substr(get_the_title(), 0, 20) . '...'; } else { // If the title is less than or equal to 5 characters, display it as is $blog_reflection_future_perfect_middle_post_title = get_the_title(); } ?>
'publish', 'post_type' => 'post', 'posts_per_page' => 3, // Only one post 'orderby' => 'date', // Order by date 'order' => 'desc', // Descending order (latest post first) 'post__not_in' => $sticky_posts, ); $blog_reflection_future_perfect_bottom_post_query = new WP_Query($blog_reflection_future_perfect_bottom_post_args); } else { // The Query $blog_reflection_future_perfect_bottom_post_args = array( 'post_type' => 'post', 'category__in' => $blog_reflection_future_perfect_bottom_category_id, // Replace with your category ID 'posts_per_page' => $blog_reflection_future_perfect_display_bottom_post_number, // Number of posts to display 'orderby' => $blog_reflection_future_perfect_bottom_post_order_by, // Order by date 'order' => $blog_reflection_future_perfect_bottom_post_order, // Order descending 'post__not_in' => $sticky_posts, ); $blog_reflection_future_perfect_bottom_post_query = new WP_Query($blog_reflection_future_perfect_bottom_post_args); } // Execute the query // The Loop if ($blog_reflection_future_perfect_bottom_post_query->have_posts()) { while ($blog_reflection_future_perfect_bottom_post_query->have_posts()) { $blog_reflection_future_perfect_bottom_post_query->the_post(); // Get the category color and link $blog_reflection_future_perfect_bottom_post_category_name = get_the_category(); if ($blog_reflection_future_perfect_bottom_post_category_name !== false) { $blog_reflection_future_perfect_bottom_custom_field_cat_color = get_term_meta($blog_reflection_future_perfect_bottom_post_category_name[0]->term_id, 'term_color', true); $blog_reflection_future_perfect_bottom_post_category_link = get_category_link($blog_reflection_future_perfect_bottom_post_category_name[0]->term_id); } $blog_reflection_future_perfect_bottom_post_img = (get_the_post_thumbnail_url(null, 'large')) ? get_the_post_thumbnail_url(null, 'large') : get_template_directory_uri() . '/assets/images/no-image.jpg'; $blog_reflection_post_thumbnail_id = get_post_thumbnail_id(get_the_ID()); if (get_the_post_thumbnail_url()) { $blog_reflection_future_perfect_image_alt_text = get_post_meta($blog_reflection_post_thumbnail_id, '_wp_attachment_image_alt', true); } else { $blog_reflection_future_perfect_image_alt_text = 'No Image'; } $blog_reflection_future_perfect_bottom_get_index_of_array = array_rand($blog_reflection_tag_color, 1); if (strlen(get_the_title()) > 5) { // Trim to the first 5 characters and add ellipsis $blog_reflection_future_perfect_bottom_post_title = substr(get_the_title(), 0, 20) . '...'; } else { // If the title is less than or equal to 5 characters, display it as is $blog_reflection_future_perfect_bottom_post_title = get_the_title(); } ?>


slug; } $blog_reflection_global_news_get_latest_post_only = get_theme_mod('global_post_cat_or_latest', 'latest'); if ($blog_reflection_global_news_get_latest_post_only == 'latest') { // Define query arguments $global_news_args = array( 'post_status' => 'publish', 'posts_per_page' => 4, 'order' => 'desc', // Use the selected order 'orderby' => 'date', // Use the selected order by 'ignore_sticky_posts' => 1, ); $global_news_query = new WP_Query($global_news_args); } else { // The Query for global news $global_news_args = array( 'post_type' => 'post', 'posts_per_page' => $blog_reflection_global_news_post_number, 'order' => $blog_reflection_global_news_post_order, 'orderby' => $blog_reflection_global_news_post_order_by, 'category_name' => $blog_reflection_global_news_category_slug, 'ignore_sticky_posts' => 1, ); $global_news_query = new WP_Query($global_news_args); } $global_news_post_counter = 0; if ($global_news_query->have_posts()) { while ($global_news_query->have_posts()) { $global_news_query->the_post(); // Get category details by slug $global_news_category = get_category_by_slug($blog_reflection_global_news_category_slug); if ($global_news_category !== false) { $global_news_custom_field_cat_color = get_term_meta($global_news_category->term_id, 'term_color', true); $global_news_cat_url = get_category_link($global_news_category->term_id); } else { $global_news_custom_field_cat_color = ''; $global_news_cat_url = ''; } // Get post image URL $global_news_post_img = (get_the_post_thumbnail_url(null, 'large')) ? get_the_post_thumbnail_url(null, 'large') : get_template_directory_uri() . '/assets/images/no-image.jpg'; $blog_reflection_post_thumbnail_id = get_post_thumbnail_id(get_the_ID()); if (get_the_post_thumbnail_url()) { $blog_reflection_global_post_image_alt_text = get_post_meta($blog_reflection_post_thumbnail_id, '_wp_attachment_image_alt', true); } else { $blog_reflection_global_post_image_alt_text = 'No Image'; } $tag_colors = array( 'style-dark-green', 'style-red', 'style-blue' ); $random_color = $tag_colors[array_rand($tag_colors)]; if (strlen(get_the_title()) > 5) { // Trim to the first 5 characters and add ellipsis $blog_reflection_global_post_title = substr(get_the_title(), 0, 20) . '...'; } else { // If the title is less than or equal to 5 characters, display it as is $blog_reflection_global_post_title = get_the_title(); } ?>
<?php echo esc_attr($blog_reflection_global_post_image_alt_text); ?>

have_posts() && $global_news_post_counter > 5) { ?>