Can't get feature image to float left of text on category page (3 posts)

  1. brookslively
    Posted 2 years ago #

    I am trying to make a child theme for Twenty Twelve with a custom category page that looks something like this: http://laurenconrad.com/blog/cat/primp. Specifically, I would like to have the feature image to the left and the post title and excerpt to the right. I've tried scouring the internet for solutions but I just keep ending up with the text above or below the feature image. Below is my current attempt that is not working

    I've tried creating a div class with this in the style.css:

    .featuredImage {
    	float: left;

    In my functions.php, I have created a new thumbnail size for the category pages:

    if ( function_exists( 'add_theme_support' ) ) {
    	add_theme_support( 'post-thumbnails' );
            set_post_thumbnail_size( 624, 9999 ); // default Post Thumbnail dimensions
    if ( function_exists( 'add_image_size' ) ) {
    	add_image_size( 'category-thumb', 300, 9999 ); //300 pixels wide (and unlimited height)

    Then in my content.php, I have the following:

    <?php if ( is_search() || is_archive() || is_author() || is_tag() ) : // Only display Excerpts  ?>
    			<div class="featuredImage">
    				<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('category-thumb'); ?></a>
    			<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                <?php the_excerpt(); ?>

    I'm very inexperienced at this, so I could easily be missing something simple. Thank`you for any help in advance.

  2. brookslively
    Posted 2 years ago #

    Did I put this question in the wrong forum?

  3. Michael
    Forum Moderator
    Posted 2 years ago #

    Did I put this question in the wrong forum?

    yes - please post in the theme's direct support section http://wordpress.org/support/theme/twentytwelve

Topic Closed

This topic has been closed to new replies.

About this Topic