WordPress.org

Support

Support » Themes and Templates » Using Twenty Ten theme, need help editing to get rid of posting info

Using Twenty Ten theme, need help editing to get rid of posting info

  • I am using the Twenty Ten theme which is included by default when I install wordpress. I am trying to remove the “Posted on [date] By [author]” information that appears for each post I make.

    I managed to tinker around in the editor and edit the single post code so the info no longer shows on the actual post page. However, the info still appears on the blog page. If it matters, I am using a static page as my front page and created a page titled “Blog” and am using it for my posts page.

    I also tried removing all the instances of code referencing this in the “Loop” file but it did not seem to work. ( I could have not done it properly or missed something )

    Can anyone point me in the right direction for the file I need to edit and what I need to actual delete or edit?

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Michael

    @alchymyth

    Forum Moderator

    have a look at the end of functions.php

    the two functions twentyten_posted_in() and twentyten_posted_on()

    i think the lines there are quite self-explanatory

    if you have problems, report back with the details.

    I removed the entire section below but it didnt do anything..

    /**
     * Prints HTML with meta information for the current post—date/time and author.
     *
     * @since Twenty Ten 1.0
     */
    function twentyten_posted_on() {
    	printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'twentyten' ),
    		'meta-prep meta-prep-author',
    		sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
    			get_permalink(),
    			esc_attr( get_the_time() ),
    			get_the_date()
    		),
    		sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
    			get_author_posts_url( get_the_author_meta( 'ID' ) ),
    			sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
    			get_the_author()
    		)
    	);
    }
    endif;
    
    if ( ! function_exists( 'twentyten_posted_in' ) ) :
    Moderator Michael

    @alchymyth

    Forum Moderator

    are you using or have you any caches installed?

    link?

    ahhhh, yes super cache pplugin is installed and activated.

    Moderator Michael

    @alchymyth

    Forum Moderator

    sorted?

    yep đŸ˜€ thanks!

    Hi, I’m trying to edit the twentyten_posted_on() function in functions.php. For items that are News items (a category) I am showing the date etc What I don’t want is for the date to be used as anchor text for the permalink – I just want to show the date. It is the sprintf element that has thrown me. What do I need to do to just have it show the date w/o the permalink?

    I’m trying to do the same thing as the guy above. I just want to remove the Posted on [date] by admin.

    I know nothing about PHP but did find the code above. I tried removing all of that and got a fatal error and the page wouldn’t display.

    Can someone tell me specifically how to edit that text in the functions.php to make them not show anymore? Thank you!

    esmi

    @esmi

    Forum Moderator

    Please post a new topic.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Using Twenty Ten theme, need help editing to get rid of posting info’ is closed to new replies.