'; } } add_action( 'blog99_before_mainsec', 'blog99_before_main_wrapper_main_sec' ); /** * Blog99 before the main content * * @since 1.0.0 * @param int $post_id get the post id * * @return string */ if ( ! function_exists( 'blog99_before_main_wrapper_sec' ) ) { /** * Blog99 Sidebar layout * * @since 1.0.0 * @return void */ function blog99_before_main_wrapper_sec() { echo '
'; } } add_action( 'blog99_after_mainsec', 'blog99_before_main_wrapper_sec' ); /** * Blog99 * author image ,link and name display *@since 1.0.0 */ if( ! function_exists('blog99_meta_authorlink') ) { function blog99_meta_authorlink(){ return '
'. blog99_meta_author_image() .'
'; } } if( ! function_exists('blog99_meta_author_image') ) { function blog99_meta_author_image(){ return get_avatar( get_the_author_meta( 'ID' ), 25, null, null, array( 'class' => 'img-circle' ) ); } } /** * Blog99 get the category * * @since 1.0.0 */ if( ! function_exists( 'blog99_get_post_categories' ) ) { /** * Get Post Category * * @return array * @since 1.0.0 */ function blog99_get_post_categories(){ $all_categories = get_categories( ); //default value $categories['all'] = 'all'; foreach( $all_categories as $category ){ $categories[$category->term_id] = $category->name; } return $categories; } } /** * Blog99 main slider options * * @since 1.0.0 * @param int $post_id get the post id * * @return string */ if ( ! function_exists( 'blog99_main_slider_section' ) ) { /** * Blog99 Main sldier section * * @since 1.0.0 * @return void */ function blog99_main_slider_section() { if( get_theme_mod('blog99_banner_slider_disable',true) == false ) return; /** * get the all customizer control data * * @since 1.0.0 */ $blog99_homepage_slider = get_theme_mod('blog99_slider_slider_section_enable',true); $blog99_slider_tranding_enable = get_theme_mod('blog99_slider_tranding_enable',true); $blog99_slider_right_enable = get_theme_mod('blog99_slider_right_enable',true); /** * Homepage Sldier Section * * @since 1.0.0 */ if( $blog99_homepage_slider != true ): return; endif; ?>
post_author ) ) { // Get author's display name $display_name = get_the_author_meta( 'display_name', $post->post_author ); // If display name is not available then use nickname as display name if ( empty( $display_name ) ) $display_name = get_the_author_meta( 'nickname', $post->post_author ); // Get author's biographical information or description $user_description = get_the_author_meta( 'user_description', $post->post_author ); // Get author's website URL $user_website = get_the_author_meta('url', $post->post_author); // Get link to the author archive page $user_posts = get_author_posts_url( get_the_author_meta( 'ID' , $post->post_author)); if ( ! empty( $display_name ) ) $author_details = '

' . esc_html( $display_name ). '

'; if ( ! empty( $user_description ) ) // Author avatar and bio $author_details .= '

' . get_avatar( get_the_author_meta('user_email') , 300 ) . nl2br( $user_description ). '

'; $author_details .= ''; } else { // if there is no author website then just close the paragraph $author_details .= '

'; } // Pass all this info to post content $content = $content . ''; } return $content; } // Add our function to the post content filter add_action( 'the_content', 'blog99_author_info_box' ); /** * Retuns the post url * * @return string the link format url. */ function blog99_get_link_url() { $content = get_the_content(); $has_url = get_url_in_content( $content ); return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() ); } /* ** Top Menu Fallback */ function blog99_footer_menu_fallback() { if ( current_user_can( 'edit_theme_options' ) ) { echo ''; } } /** * Get Blog Class */ function blog99_get_list_gird_column_class(){ $blog99_blog_style = get_theme_mod('blog99_blog_style','list'); if( $blog99_blog_style == 'list' ){ $class = 'col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 wow fadeInUp '; } elseif( $blog99_blog_style == 'masonry' ){ $class = 'col-xl-6 col-lg-6 col-md-6 col-sm-12 col-12 masonry wow fadeInUp '; } else{ $class = 'col-xl-6 col-lg-6 col-md-6 col-sm-12 col-12 wow fadeInUp '; } return $class; } /** * Get Blog Class */ function blog99_get_meta_content($post_id){ $blog99_blog_style = get_theme_mod('blog99_blog_style','list'); if( $blog99_blog_style == 'grid' || $blog99_blog_style == 'masonry' ) return; ?>
'post','posts_per_page'=>1,'cat'=>$cat_id); $q = new WP_Query( $args ); $first_post = ''; while($q->have_posts()): $q->the_post(); if( has_post_thumbnail( $q->post ) ): $first_post = get_the_post_thumbnail_url($q->post,'full'); endif; endwhile; // End of the loop. return $first_post; } //blog99_single_page_layout_two function blog99_single_page_layout_two_section(){ if ( have_posts() ) : ?>
  • '; echo $form; ?>