'; if(the_title( '', '', false ) !='') the_title(); else esc_html_e('Untitled', 'longevity'); echo ''; else : echo '

'; if(the_title( '', '', false ) !='') the_title(); else esc_html_e('Untitled', 'longevity'); echo '

'; endif; } endif; if ( ! function_exists( 'longevity_post_thumbnail' ) ) : /** * Display an optional post thumbnail. * * Wraps the post thumbnail in an anchor element on index views, or a div * element when on single views. */ function longevity_post_thumbnail() { if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; } if ( is_singular() ) : ?>
get_the_title(), 'itemprop' => "image")); ?>
%s', esc_attr(get_theme_mod( 'sticky_post_label' )) ? esc_html( get_theme_mod( 'sticky_post_label' ) ) : esc_html__('Featured', 'longevity' ) ); endif; ?>
%1$s ', _x( 'By', 'Used before post author name.', 'longevity' ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), get_the_author() ); } } if ( ! is_singular() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { if ( esc_attr(get_theme_mod( 'show_comments_link', 1 )) ) : echo ''; comments_popup_link( sprintf( __( 'Leave a comment on %s', 'longevity' ), get_the_title() ) ); echo ''; endif; } if( esc_attr(get_theme_mod( 'show_edit', 1 ) ) ) { edit_post_link( esc_html__( 'Edit this Post', 'longevity' ), '', '' ); } } endif; /** * Prints HTML with date the post was created. */ if ( ! function_exists( 'longevity_posted_on' ) ) : function longevity_posted_on( $before = '', $after = '' ) { $time_string = ''; $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), get_the_date() ); printf( '%s %s%s', $before, $time_string, $after ); } endif; /** * Prints HTML with post categories list. */ if ( ! function_exists( 'longevity_categories_list' ) ) : function longevity_categories_list() { $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'longevity' ) ); if ( $categories_list && longevity_categorized_blog() && is_single() ) { printf( '%1$s %2$s', _x( 'Categories', 'Used before category names.', 'longevity' ), $categories_list ); } else { printf( '%s', $categories_list ); } } endif; /** * Prints HTML with post tags list. */ if ( ! function_exists( 'longevity_tags_list' ) ) : function longevity_tags_list() { $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'longevity' ) ); if ( $tags_list ) { printf( '%1$s %2$s', _x( 'Tags', 'Used before tag names.', 'longevity' ), $tags_list ); } } endif; /** * Check if post has more tag. */ function longevity_has_more() { global $post; if( is_singular() ) return false; if( strpos( $post->post_content, '' ) ) return true; return false; } /** * Blog pagination when more than one page of post summaries. */ if ( ! function_exists( 'longevity_blog_pagination' ) ) : function longevity_blog_pagination() { the_posts_pagination( array( 'prev_text' => '' . esc_html__( 'Prev', 'longevity' ) . '', 'next_text' => '' . esc_html__( 'Next', 'longevity' ) . '', 'before_page_number' => '' ) ); } endif; /** * Single Post previous or next navigation. */ if ( ! function_exists( 'longevity_post_pagination' ) ) : function longevity_post_pagination() { the_post_navigation( array( 'next_text' => ' ' . '' . esc_html__( 'Next Article:', 'longevity' ) . ' ' . '%title', 'prev_text' => ' ' . '' . esc_html__( 'Previous Article:', 'longevity' ) . ' ' . '%title', ) ); } endif; /** * Multi-page navigation. */ if ( ! function_exists( 'longevity_multipage_nav' ) ) : function longevity_multipage_nav() { wp_link_pages( array( 'before' => '', 'link_before' => '', 'link_after' => '', 'pagelink' => '' . esc_html__( 'Page', 'longevity' ) . ' %', 'separator' => ', ', ) ); } endif;