0

I have a few things that I need help with in Twenty Eleven.

  1. The logo I put in the header is resized to 578px by 160px, when it is supposed to be 326px by 90px.

  2. I would like to simply the php code that controls this: http://i55.tinypic.com/33tsehh.jpg

I added the gradient to the info box and also the about the author text and bio line. I'm not very knowledgeable with PHP so I don't want to mess with it without help.

<?php
        /* translators: used between list items, there is a space after the comma */
        $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );


        /* translators: used between list items, there is a space after the comma */
        $tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
        if ( '' != $tag_list ) {
            $utility_text = __( 'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>.', 'twentyeleven' );
        } elseif ( '' != $categories_list ) {
            $utility_text = __( 'This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
        } else {
            $utility_text = __( 'This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
        }


        printf(
            $utility_text,
            $categories_list,
            $tag_list,
            esc_url( get_permalink() ),
            the_title_attribute( 'echo=0' ),
            get_the_author(),
            esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )
        );
    ?>
  1. I want to know how I could add a featured image for each post to the front page because it doesn't seem like it has one coded in.

Here is a live link: http://gscdesigns.co.cc/ Thanks.

0

1 Answer 1

3

Adding a post thumbnail is pretty easy, open content.php, if you're using excerpts on your homepage find this

<?php the_excerpt(); ?>

then add this just above that line

<?php the_post_thumbnail('thumbnail', 'class=alignleft'); ?>

If you're not using excerpts add it above

<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>

If you'd like a specific image size for your post thumbnails you can add something like this to functions.php, change 140, 140 to whatever size you want.

add_image_size('excerpt-thumbnail', 140, 140, true);

Then change

<?php the_post_thumbnail('thumbnail', 'class=alignleft'); ?>

To

<?php the_post_thumbnail('excerpt-thumbnail', 'class=alignleft'); ?>

Then just add a featured image to a post. It's best to do this with by creating a child theme.

Not sure what you're asking for the first two questions, maybe you could explain them a little more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.