* @copyright Copyright (c) 2019, Aeon Theme * @link http://www.aeontheme.com/themes/aeonblog * @license http://www.gnu.org/licenses/gpl-2.0.html * * AeonBlogSlider Function * @since AeonBlog 1.0.0 * * @param null * @return void * */ if ( !function_exists('aeonblog_slider') ) : function aeonblog_slider() { global $aeonblog_theme_options; $enable_slider = absint($aeonblog_theme_options['aeonblog-enable-slider']); $slider_cat_id = absint($aeonblog_theme_options['aeonblog-slider-category']); $slider_number = absint($aeonblog_theme_options['aeonblog-slider-number']); if ( 1 === $enable_slider && is_home() || is_front_page() ) : ?>
<?php echo esc_attr(get_bloginfo('name', 'display')); ?>
"; 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', 'aeonblog'), 'next_text' => __('Next »', 'aeonblog'), )); echo ""; } } endif; add_action( 'aeonblog_action_navigation', 'aeonblog_posts_navigation', 10 ); /** * Display related posts from same category * * @since AeonBlog 1.0.0 * * @param int $post_id * @return void * */ if ( !function_exists('aeonblog_related_post') ) : function aeonblog_related_post( $post_id ) { global $aeonblog_theme_options; if( 0 == $aeonblog_theme_options['aeonblog-related-post'] ){ return; } $categories = get_the_category( $post_id ); if ($categories) { $category_ids = array(); $category = get_category($category_ids); $categories = get_the_category( $post_id ); foreach ( $categories as $category ){ $category_ids[] = $category->term_id; } $count = $category->category_count; if($count > 1 ){ ?> manager->get_control($setting->id)->choices; // If the input is a valid key, return it; otherwise, return the default. return (array_key_exists($input, $choices) ? $input : $setting->default); } endif;