ID; } $categories = get_the_category($post_id); $output = ''; $separator = ' '; if ($categories) { $output .= '
'; $output .= ''; foreach ($categories as $category) { $output .= '' . esc_html($category->cat_name) . '' . $separator; } $output .= ''; $output .= '
'; return $output; } } endif; if (!function_exists('fairy_constuct_carousel')) { /** * Add carousel on header * * @since 1.0.0 */ function fairy_constuct_carousel() { if (is_front_page()) { global $fairy_theme_options; if ($fairy_theme_options['fairy-enable-slider'] != 1) return false; $featured_cat = absint($fairy_theme_options['fairy-select-category']); $fairy_slider_args = array(); if(is_rtl()){ $fairy_slider_args['rtl'] = true; } $fairy_slider_args_encoded = wp_json_encode( $fairy_slider_args ); $query_args = array( 'post_type' => 'post', 'ignore_sticky_posts' => true, 'posts_per_page' => 6, 'cat' => $featured_cat ); $query = new WP_Query($query_args); if ($query->have_posts()) : ?>
" . __('Load More', 'across') . "
"; } } else { the_posts_navigation(); } } } add_action('fairy_action_navigation', 'fairy_posts_navigation', 10); if (!function_exists('across_footer_instagram_feed')) { /** * Add Go to Top Button on Site. * * @param none * @return void * * @since 1.0.0 * */ function across_footer_instagram_feed() { global $fairy_theme_options; $instagram_shortcode = $fairy_theme_options['fairy-footer-instagram']; if (!empty($instagram_shortcode) && function_exists('sb_instagram_feed_init')) { echo do_shortcode($instagram_shortcode); } } } add_action('fairy_newsletter', 'across_footer_instagram_feed', 20); if (!function_exists('fairy_constuct_single_cat_posts')) { /** * Display latest posts boxes of 3 different categories * * @since 1.0.0 * */ function fairy_constuct_single_cat_posts() { global $fairy_theme_options; $cat1 = absint($fairy_theme_options['fairy-single-cat-posts-select-1']); if (!empty($cat1)) { ?>
$cat1, 'post_type' => 'post', 'posts_per_page' => 3, 'post_status' => 'publish', 'ignore_sticky_posts' => true ); $fairy_featured_query = new WP_Query($fairy_cat_post_args); if ($fairy_featured_query->have_posts()) : while ($fairy_featured_query->have_posts()) : $fairy_featured_query->the_post(); ?>
| Candid Themes' ); ?>