Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
  • in reply to: Remove Date, Author and amount of comments #19276
     Nudrica
    Participant

    Mine looked like this:

    COPY CODE
    
    function 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>';
    	}
    
    }
    
Viewing 1 post (of 1 total)

Log in with your credentials

Forgot your details?