• >
    %s', 'good' ), get_comment_author_link() ) ?>

    comment_ID ) ) . '">' . get_comment_date( get_option( 'date_format' ) ) . ' ' . get_comment_time( get_option( 'time_format' ) ) . '', get_comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ) ); ?>

    comment_approved == '0' ) : ?>

    is added by wordpress automatically */ } endif; if ( ! function_exists( 'good_posted_on' ) ) : /** * Prints HTML with meta information for the current post-date/time and author. */ function good_posted_on() { printf( __( '', 'good' ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); } endif; /** * Returns true if a blog has more than 1 category */ function good_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'good_the_cool_cats' ) ) ) { // Create an array of all the categories that are attached to posts $all_the_cool_cats = get_categories( array( 'hide_empty' => 1, ) ); // Count the number of categories that are attached to the posts $all_the_cool_cats = count( $all_the_cool_cats ); set_transient( 'good_the_cool_cats', $all_the_cool_cats ); } if ( '1' != $all_the_cool_cats ) { // This blog has more than 1 category so good_categorized_blog should return true return true; } else { // This blog has only 1 category so good_categorized_blog should return false return false; } } /** * Flush out the transients used in good_categorized_blog */ function good_category_transient_flusher() { // Like, beat it. Dig? delete_transient( 'good_the_cool_cats' ); } add_action( 'edit_category', 'good_category_transient_flusher' ); add_action( 'save_post', 'good_category_transient_flusher' ); /** * Get related post, with the same category */ function good_related_posts() { $post = get_post(); $category = get_the_category( $post->ID ); $cat_id = $category[0]->cat_ID; $args = array( 'cat' => $cat_id, 'showposts' => 3, 'post__not_in' => array( $post->ID ) ); $related_posts = new WP_Query( $args ); if ( ! $related_posts->have_posts() ) { return; } ?>
    have_posts() ) : $related_posts->the_post(); get_template_part( 'template-parts/content-widget', 'three-columns' ); endwhile; wp_reset_query(); ?>
    ' . __( 'Home', 'good' ) . ' '; } if ( ( is_category() || is_single() ) && ! is_attachment() ) { $category = get_the_category(); if ( count( $category ) > 0 ) { $ID = $category[0]->cat_ID; if ( $ID ) { echo get_category_parents( $ID, true, ' ', false ); } } } if ( ! is_front_page() && ( is_single() || is_page() ) ) { the_title(); } if ( is_tag() ) { printf( __( 'Tag: %s', 'good' ), single_tag_title( '', false ) ); } if ( is_404() ) { _e( '404 - Page not Found', 'good' ); } if ( is_search() ) { _e( 'Search', 'good' ); } if ( is_year() ) { echo get_the_time( 'Y' ); } if ( is_month() ) { echo get_the_time( 'F Y' ); } if ( is_author() ) { printf( __( 'Posts by %s', 'good' ), get_the_author() ); } if ( ! is_front_page() ) { echo ""; } } /** * Page Navigation */ function good_pagenavi( $the_query = '' ) { global $theme_options; if ( $the_query ) { $wp_query = $the_query; } else { global $wp_query; } $show_number = 2; $total = $wp_query->max_num_pages; if ( $total > 1 ) { if ( ! $current_page = get_query_var( 'paged' ) ) { $current_page = 1; } if ( ! get_option( 'permalink_structure' ) ) { $format = '&paged=%#%'; if ( is_home() ) { $format = '?paged=%#%'; } } else { $format = '/page/%#%/'; } if ( is_search() ) { $format = '&paged=%#%'; } echo ''; } else { echo ''; } }