• how correct delete that’s:
    http://s018.radikal.ru/i514/1308/5c/c481e9d70a1e.png

    that is, the date and author. how delete?

    file – template-tags.php

    /**
    * Prints HTML with meta information for current post: categories, tags, permalink, author, and date.
    *
    * Create your own leaf_entry_meta() to override in a child theme.
    *
    * @since Leaf 1.0
    */
    if ( ! function_exists( 'leaf_entry_meta' ) ) :
    
    function leaf_entry_meta() {
    	// Translators: used between list items, there is a space after the comma.
    	$categories_list = get_the_category_list( __( ', ', 'leaf' ) );
    
    	// Translators: used between list items, there is a space after the comma.
    	$tag_list = get_the_tag_list( '', __( ', ', 'leaf' ) );
    
    	$date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date updated" 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('F j, Y') )
    	);
    
    	$author = sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
    		esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    		esc_attr( sprintf( __( 'View all posts by %s', 'leaf' ), get_the_author() ) ),
    		get_the_author()
    	);
    
    	// Translators: 1 author's name, 2 category, 3 tag's, and 4 is the date.
    	if ( '' != $tag_list ) {
    		$utility_text = __( '<span class="posted-by">Posted by: %1$s </span><span class="spacer">//</span> %2$s <span class="spacer">//</span> %3$s <span class="spacer">//</span> %4$s', 'leaf' );
    	} elseif ( ! empty( $categories_list ) && leaf_is_categorized_site() ) {
    		$utility_text = __( '<span class="posted-by">Posted by: %1$s </span><span class="spacer">//</span> %2$s <span class="spacer">//</span> %4$s', 'leaf' );
    	} else {
    		$utility_text = __( '<span class="posted-by">Posted by: %1$s </span> //  %4$s', 'leaf' );
    	}
    
    	printf(
    		$utility_text,
    		$author,
    		$categories_list,
    		$tag_list,
    		$date
    	);
    }
    endif;

    I deleted only:

    $date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date updated" 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('F j, Y') )
    	);
    
    	$author = sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
    		esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    		esc_attr( sprintf( __( 'View all posts by %s', 'leaf' ), get_the_author() ) ),
    		get_the_author()
    	);

    but in the end that’s what happened:
    http://s16.radikal.ru/i191/1308/e4/47dbad0f4664.png

    do you understand me?) if yes, please, help me.

Viewing 13 replies - 1 through 13 (of 13 total)
  • What do you mean? Can you be more specific in what you are trying to accomplish?

    Try and remove these two lines where I have commented:

    printf(
    		$utility_text,
    		$author, <!-- delete this line -->
    		$categories_list,
    		$tag_list,
    		$date <!-- delete this line -->
    	);
    Thread Starter user-press

    (@user-press)

    What do you mean? Can you be more specific in what you are trying to accomplish?

    to do so, that would not show on the page, author, and date.

    see screenshot:
    http://s018.radikal.ru/i514/1308/5c/c481e9d70a1e.png
    understand?

    Try and remove tehese two (in bold):

    deleted, take a look now(can not go to the site):
    http://s001.radikal.ru/i193/1308/24/0ea5d90d2c2f.png

    Oh it is my mistake. Remove the comma after $tag_list after you remove $date below it. That may be why it is preventing you from getting to the site. So it should be:

    printf(
    		$utility_text,
    		$categories_list,
    		$tag_list
    	);

    It is a little difficult to understand only because your site is not in English so I am having a difficult time understanding what is being printed etc

    Thread Starter user-press

    (@user-press)

    Oh it is my mistake. Remove the comma after $tag_list after you remove $date below it. That may be why it is preventing you from getting to the site. So it should be:

    seems to work(author and date removed), but now does not appear categories and tags(

    It is a little difficult to understand only because your site is not in English so I am having a difficult time understanding what is being printed etc

    the screenshot was written by a remote server or file not found

    So now nothing appears?

    I am installing the theme to see if I can remove them. If I can figure something out I will post the code here.

    So from what I understand…

    You just want to remove the date and the author of when and who created the post.

    Is that correct?

    Edit the code on line 140:

    // Translators: 1 author's name, 2 category, 3 tag's, and 4 is the date.
    	if ( '' != $tag_list ) {
    		$utility_text = __( '<span class="posted-by">Posted by: %1$s </span><span class="spacer">//</span> %2$s <span class="spacer">//</span> %3$s <span class="spacer">//</span> %4$s', 'leaf' );
    	} elseif ( ! empty( $categories_list ) && leaf_is_categorized_site() ) {
    		$utility_text = __( '<span class="posted-by">Posted by: %1$s </span><span class="spacer">//</span> %2$s <span class="spacer">//</span> %4$s', 'leaf' );
    	} else {
    		$utility_text = __( '<span class="posted-by">Posted by: %1$s </span> //  %4$s', 'leaf' );
    	}

    so that it would now be:

    // Translators: 1 author's name, 2 category, 3 tag's, and 4 is the date.
    	if ( '' != $tag_list ) {
    		$utility_text = __( '%2$s <span class="spacer">//</span> %3$s', 'leaf' );
    	} elseif ( ! empty( $categories_list ) && leaf_is_categorized_site() ) {
    		$utility_text = __( '%2$s', 'leaf' );
    	} else {
    		$utility_text = __( '%2$s', 'leaf' );
    	}

    This will only display the ‘Category Name’ and also the associate ‘Tags’ if they are set.

    Thread Starter user-press

    (@user-press)

    omg, thank you so much!

    i’m glad, then you understand me)

    then here is no need to delete?

    $date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date updated" 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('F j, Y') )
    	);
    
    	$author = sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
    		esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    		esc_attr( sprintf( __( 'View all posts by %s', 'leaf' ), get_the_author() ) ),
    		get_the_author()
    	);

    @user-press – please stop bumping your threads – it’s against the forum rules – these are VOLUNTEER forums – if you need more help, you should consider hiring someone – http://jobs.wordpress.net/

    Thread Starter user-press

    (@user-press)

    WPyogi, i simply ask for help, maybe someone can help me. or ask for help is prohibited?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘theme "leaf". how delete that's’ is closed to new replies.