__('Main Sidebar', 'advent'), 'id' => 'sidebar-1', 'description' => __('Main sidebar that appears on the right.', 'advent'), 'before_widget' => '', 'before_title' => '', )); } add_action('widgets_init', 'advent_widgets_init'); /** * Set up post entry meta. * Meta information for current post: categories, tags, permalink, author, and date. * */ function advent_entry_meta() { $advent_category_list = get_the_category_list( ', ',' '); $advent_tag_list = get_the_tag_list('',', ',' '); $advent_date = sprintf( '', esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); $advent_author = sprintf( '%3$s', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf(/* translators: %s is author name*/ __( 'View all posts by %s', 'advent' ), get_the_author() ) ), get_the_author() ); $post_in = '
  • %1$s
  • '; $post_on = '
  • %3$s
  • '; $post_by = '
  • %4$s
  • '; $post_tag = '
  • %2$s
  • '; $post_comment= '
  • '. advent_comment_number_custom() .'
  • '; if ($advent_tag_list) { $advent_utility_text = '
    '; } elseif ( $advent_category_list ) { $advent_utility_text = '
    '; } else { $advent_utility_text = '
    '; } printf( $advent_utility_text, $advent_category_list, $advent_tag_list, $advent_date, $advent_author ); } function advent_comment_number_custom(){ $adventpro_num_comments = get_comments_number(); // get_comments_number returns only a numeric value $adventpro_comments=__('No Comments','advent'); if ( comments_open() ) { if ( $adventpro_num_comments == 0 ) { $adventpro_comments = __('No Comments','advent'); } elseif ( $adventpro_num_comments > 1 ) { $adventpro_comments = $adventpro_num_comments . __(' Comments','advent'); } else { $adventpro_comments = __('1 Comment','advent'); } } return $adventpro_comments; }