• I have a php related question.

    I have this

    <?php if ( has_post_thumbnail() ) { ?>
    <?php the_post_thumbnail(array(100,100), array('class' => 'alignleft')); ?>
    <?php } ?>
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>

    This brings out a thumb and a link to the post on the sidebar. My goal is to make the thumb a link to the post too.

    Happy Easter

Viewing 2 replies - 1 through 2 (of 2 total)
  • put the link around the thumb; for instance:

    <?php if ( has_post_thumbnail() ) { ?>
    <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
    <?php the_post_thumbnail(array(100,100), array('class' => 'alignleft')); ?>
    </a>
    <?php } ?>
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <?php the_title(); ?></a></h2>
    Thread Starter fireeee

    (@fireeee)

    Thank you. I tried it like that but forgot to put the second > after ?>”

    ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘a href thumb’ is closed to new replies.