WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Using Twenty Ten theme, need help editing to get rid of posting info (10 posts)

  1. ernieb
    Member
    Posted 4 years ago #

    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!

  2. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    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.

  3. ernieb
    Member
    Posted 4 years ago #

    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' ) ) :
  4. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    are you using or have you any caches installed?

    link?

  5. ernieb
    Member
    Posted 4 years ago #

    ahhhh, yes super cache pplugin is installed and activated.

  6. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    sorted?

  7. ernieb
    Member
    Posted 4 years ago #

    yep :D thanks!

  8. cosmicjellybaby
    Member
    Posted 3 years ago #

    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?

  9. ms_webcasa
    Member
    Posted 3 years ago #

    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!

  10. esmi
    Forum Moderator
    Posted 3 years ago #

    Please post a new topic.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.