WordPress.org

Ready to get started?Download WordPress

Forums

How to center entry-meta? (7 posts)

  1. bg
    Member
    Posted 2 years ago #

    Hi, I am using Twenty Ten theme. I would like to know how can I center entry-meta? And, how do I remove posted by?

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

    please create a child theme http://codex.wordpress.org/Child_Themes of Twenty Ten to work with.

    in functions.php of the child theme, add:

    function twentyten_posted_on() {
    	printf( __( '<span class="%1$s">Posted on</span> %2$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()
    		)
    	);
    }

    to style.css of the child theme, add:

    .entry-meta { text-align: center; }

  3. bg
    Member
    Posted 2 years ago #

    Hi, thank you very much for your prompt response! It did work, but I decided to keep the author's name anyway. I have now an another question: How do I add a horizontal line right under the post title, so it divines the post title and posted on? Thanks!

  4. SNSD Photo
    Member
    Posted 2 years ago #

    in loop-single.php
    find <h1 class="entry-title"><?php the_title(); ?></h1>
    and add
    <hr>
    below code above

    so it will be

    <h1 class="entry-title"><?php the_title(); ?></h1>
    <hr>
    <div class="entry-meta">
    <?php twentyten_posted_on(); ?>
    </div><!-- .entry-meta -->

    trick above only work for single post display or posts.

  5. bg
    Member
    Posted 2 years ago #

    Hi, thanks for your help! But, after I did that nothing has changed?! I'm using Twenty Ten newest version.

  6. bg
    Member
    Posted 2 years ago #

    Sorry about my previous reply. Yes, it did work in single post display. But, how do I make it to show in all posts at the front page as well?

  7. bg
    Member
    Posted 2 years ago #

    I have an another question: How to make my blog view like a desktop in which people will be able to view the whole site with everything in it as if they viewed it on a desktop? Because, I have put banner ads on both sides next to the sidebars, but when I viewed it on my iphone the banner ads overlap the page's header totally. So, where do I have to modify to make it view like a desktop? Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags