-
Author
Tagged: meta
-
January 4, 2015 at 02:29 #40950tmmtechsupportParticipant
Hi, I would like to remove this comma from the metadata of the post grid. I have already used the following custom css to remove time and categories, but this comma remains between date and comment count as per the attached image, can you please help me?
article .article-meta .post-meta a.post-time {
content: none;
display: none;
}
small.meta-category {
display: none;
}Attachments:
You must be logged in to view attached files.January 4, 2015 at 14:32 #40963RaduModeratorHello,
Paste this in your Kleo-Child theme functions.php
COPY CODEif ( ! function_exists( 'kleo_entry_meta' ) ) : /** * Prints HTML with meta information for current post: categories, tags, permalink, author, and date. * Create your own kleo_entry_meta() to override in a child theme. * @since 1.0 */ function kleo_entry_meta($echo=true, $att=array()) { $meta_list = array(); // Translators: used between list items, there is a space after the comma. $categories_list = get_the_category_list( __( ', ', 'kleo_framework' ) ); // Translators: used between list items, there is a space after the comma. $tag_list = get_the_tag_list( '', __( ', ', 'kleo_framework' ) ); $date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark">' . '<time class="entry-date" datetime="%3$s">%4$s</time>' . '<time class="modify-date hide hidden updated" datetime="%5$s">%6$s</time>' . '</a>', esc_url( get_permalink() ), esc_attr( get_the_title() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_html( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); $author = sprintf( '<a href="%1$s" title="%2$s" rel="author">%3$s</a>', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'kleo_framework' ), get_the_author() ) ), get_the_author() ); $meta_list[] = '<small class="meta-author author vcard">'.$author.'</small>'; $meta_list[] = '<small>'.$date.'</small>'; $cat_tag = array(); if ( $categories_list ) { $cat_tag[] = $categories_list; } if ($tag_list) { $cat_tag[] = $tag_list; } if (!empty($cat_tag)) { $meta_list[] = '<small class="meta-category">'.implode(", ",$cat_tag).'</small>'; } //comments if (!isset($att['comments']) || (isset($att['comments']) && $att['comments'] !== false)) { $meta_list[] = '<small class="meta-comment-count"><a href="'. get_permalink().'#comments">'.get_comments_number().' <i class="icon-chat-1 hover-tip" data-original-title="'.sprintf( _n( 'This article has one comment', 'This article has %1$s comments', get_comments_number(), 'kleo_framework' ),number_format_i18n( get_comments_number() ) ).'" data-toggle="tooltip" data-placement="top"></i></a></small>'; } if ($echo) { echo implode(" ", $meta_list); } else { return implode(" ", $meta_list); } } endif;
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘KLEO’ is closed to new topics and replies.