ID, 'allure_news_sidebar_layout', true); if (('default-sidebar' != $single_sidebar) && (!empty($single_sidebar))) { $sidebar = $single_sidebar; } } if (is_front_page()) { $sidebar = $allure_news_theme_options['allure-news-sidebar-front-page'] ? $allure_news_theme_options['allure-news-sidebar-front-page'] : 'right-sidebar'; } if (($sidebar == 'right-sidebar') || ($sidebar == 'left-sidebar')) { get_sidebar(); } } endif; add_action('allure_news_sidebar', 'allure_news_construct_sidebar', 10); /** * Display Breadcrumb * * @param none * @return void * * @since Allure News 1.0.0 * */ if (!function_exists('allure_news_construct_breadcrumb')) : function allure_news_construct_breadcrumb() { global $allure_news_theme_options; //Check if breadcrumb is enabled from customizer if ($allure_news_theme_options['allure-news-extra-breadcrumb'] == 1): /** * Adds Breadcrumb based on customizer option * * @since Allure News 1.0.0 */ $breadcrumb_type = $allure_news_theme_options['allure-news-breadcrumb-display-from-option']; if ($breadcrumb_type == 'plugin-breadcrumb') { $breadcrumb_plugin = $allure_news_theme_options['allure-news-breadcrumb-display-from-plugins']; ?>
'div', 'show_browse' => false ); $allure_news_you_are_here_text = esc_html($allure_news_theme_options['allure-news-breadcrumb-text']); if (!empty($allure_news_you_are_here_text)) { $allure_news_you_are_here_text = "" . $allure_news_you_are_here_text . ""; } echo "
" . $allure_news_you_are_here_text . "
"; breadcrumb_trail($breadcrumb_args); echo "
"; ?>
"; global $wp_query; $big = 999999999; // need an unlikely integer echo paginate_links(array( 'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), 'format' => '?paged=%#%', 'current' => max(1, get_query_var('paged')), 'total' => $wp_query->max_num_pages, 'prev_text' => __('« Prev', 'allure-news'), 'next_text' => __('Next »', 'allure-news'), )); echo ""; } } endif; add_action('allure_news_action_navigation', 'allure_news_posts_navigation', 10); /** * Social Sharing Hook * * @param int $post_id * @return void * * @since 1.0.0 * */ if (!function_exists('allure_news_constuct_social_sharing')) : function allure_news_constuct_social_sharing($post_id) { global $allure_news_theme_options; $allure_news_enable_blog_sharing = $allure_news_theme_options['allure-news-enable-blog-sharing']; $allure_news_enable_single_sharing = $allure_news_theme_options['allure-news-enable-single-sharing']; $allure_news_enable_front_sharing = $allure_news_theme_options['allure-news-enable-static-page-sharing']; if (($allure_news_enable_blog_sharing != 1) && (!is_singular())) { return; } if (($allure_news_enable_single_sharing != 1) && (is_singular())) { return; } if (($allure_news_enable_front_sharing != 1) && (is_front_page()) && ('page' == get_option('show_on_front'))) { return; } $allure_news_url = get_the_permalink($post_id); $allure_news_title = get_the_title($post_id); $allure_news_image = get_the_post_thumbnail_url($post_id); //sharing url $allure_news_twitter_sharing_url = esc_url('http://twitter.com/share?text=' . $allure_news_title . '&url=' . $allure_news_url); $allure_news_facebook_sharing_url = esc_url('https://www.facebook.com/sharer/sharer.php?u=' . $allure_news_url); $allure_news_pinterest_sharing_url = esc_url('http://pinterest.com/pin/create/button/?url=' . $allure_news_url . '&media=' . $allure_news_image . '&description=' . $allure_news_title); $allure_news_linkedin_sharing_url = esc_url('http://www.linkedin.com/shareArticle?mini=true&title=' . $allure_news_title . '&url=' . $allure_news_url); ?>
'post', 'ignore_sticky_posts' => true, 'posts_per_page' => 4, 'cat' => $cat_id ); $query = new WP_Query($query_args); $count = $query->post_count; if ($query->have_posts()) : ?>
    have_posts()) : $query->the_post(); ?>
  • <?php the_title(); ?> <?php the_title_attribute(); ?>