• Afternoon guys,

    Not a seasoned coder by any means, but can make amends to the site as and when needed. Here is some code from the homepage of the site:

    <?php
    $taxQuery = array(
    array('taxonomy' => 'post_format',
    'field'    => 'slug',
    'operator' => 'NOT IN',							'terms'    => array('post-format-aside'),							)
    );
    
    $count=0;
    
    foreach (get_posts(array('numberposts' => 3, 'tax_query' => $taxQuery)) as $post)
    { ?>
    
    <a href="<?php echo get_permalink($post->ID) ?>" class="ribbon small"><span class="img"></span><?php echo $post->post_title ?></a>
    
    <?php if (!$count++) {
    							the_post_thumbnail('thumbnail');
    }
    }
    ?>

    Can anyone tell me how to get the one thumbnail to appear in the center, it currently appears at the left and is 150px x 150px and sits in a col 240px wide so doesn’t look ideal. I’d either like to center it, or resize it to 240 wide. I’ve seen some other threads and tried to implement the code in but every way I’ve tried just causes the page to fail loading.

Viewing 1 replies (of 1 total)
  • It is very difficult to diagnose this type of problem without being able to view the site. If you post a link to your site, someone may be able to help you.

Viewing 1 replies (of 1 total)
  • The topic ‘Center my the_post_thumbnail’ is closed to new replies.