-
Author
Tagged: remove date
-
May 27, 2014 at 15:36 #18869
Nudrica
ParticipantHi
Nice theme – I need to remove Date, Author and amount of comments from my posts.
I have searched but cant really find anything that helps me
June 2, 2014 at 00:37 #19211Abe
KeymasterHi, Thank you.
You have to copy sweetdate_entry_meta function from sweetdate/functions.php into your sweetdate-child/functions.php and comment the lines that generate thatHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.June 3, 2014 at 09:18 #19270Nudrica
ParticipantHi Abe
That blow the site – Dont know what i wrote wrong cause I just copied it in.
June 3, 2014 at 09:21 #19271Abe
KeymasterYou copied something wrong. copy just the function to the child theme functions.php
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.June 3, 2014 at 09:24 #19272Nudrica
Participantand the function is not 25 lines I guess 🙂 sry for being all newbie here
June 3, 2014 at 09:59 #19274Abe
Keymasterwell this should be the function:
COPY CODEfunction sweetdate_entry_meta() { // 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></a>', esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); $author = sprintf( '<a class="url fn n" 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() ); // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name. if ( $categories_list ) { echo '<li><i class="icon-calendar"></i> '.$date.'</li>'; echo '<li><i class="icon-user"></i> '.$author.'</li>'; echo '<li><i class="icon-heart"></i> '.$categories_list.'</li>'; if ($tag_list) echo '<li><i class="icon-tags"></i> '.$tag_list.'</li>'; echo '<li><i class="icon-comments"></i> <a href="'.get_permalink().'#comments">'.sprintf( _n( 'One comment', '%1$s comments', get_comments_number(), 'kleo_framework' ),number_format_i18n( get_comments_number() ) ).'</a></li>'; } else { echo '<li><i class="icon-calendar"></i> '.$date.'</li>'; echo '<li><i class="icon-user"></i> '.$author.'</li>'; if ($tag_list) echo '<li><i class="icon-tags"></i> '.$tag_list.'</li>'; echo '<li><i class="icon-comments"></i> <a href="'. get_permalink().'#comments">'.sprintf( _n( 'One comment', '%1$s comments', get_comments_number(), 'kleo_framework' ),number_format_i18n( get_comments_number() ) ).'</a></li>'; } }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.June 3, 2014 at 10:06 #19276Nudrica
ParticipantMine looked like this:
COPY CODEfunction sweetdate_entry_meta() { // 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></a>', esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_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() ); // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name. if ( $categories_list ) { echo '<li><i class="icon-calendar"></i> '.$date.'</li>'; echo '<li><i class="icon-user"></i> '.$author.'</li>'; echo '<li><i class="icon-folder-close"></i> '.$categories_list.'</li>'; if ($tag_list) echo '<li><i class="icon-tags"></i> '.$tag_list.'</li>'; echo '<li><i class="icon-comments"></i> <a href="'.get_permalink().'#comments">'.sprintf( _n( 'One comment', '%1$s comments', get_comments_number(), 'kleo_framework' ),number_format_i18n( get_comments_number() ) ).'</a></li>'; } else { echo '<li><i class="icon-calendar"></i> '.$date.'</li>'; echo '<li><i class="icon-user"></i> '.$author.'</li>'; if ($tag_list) echo '<li><i class="icon-tags"></i> '.$tag_list.'</li>'; echo '<li><i class="icon-comments"></i> <a href="'. get_permalink().'#comments">'.sprintf( _n( 'One comment', '%1$s comments', get_comments_number(), 'kleo_framework' ),number_format_i18n( get_comments_number() ) ).'</a></li>'; } }
January 8, 2015 at 21:36 #41365MattAdams
ParticipantSorry, I am trying to comment out the date, but I’m just not getting it right. Can someone please show the final code for removing the date, where you commented out the right part/s of the code?
Thank you.
~Matt
January 14, 2015 at 01:12 #41964Abe
KeymasterTo hide the date you can just do it via CSS
COPY CODE.link-list li:first-child { display: none; }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
You must be logged in to reply to this topic.