Forums

Adding Custom Field text above post thumb (1 post)

  1. mrwangkai
    Member
    Posted 3 years ago #

    Hello,

    This is my site: CareAce.net
    As you can see there are thumbs right next to the excerpt on the main pages. I'd use get_post_meta to achieve the thumbs with this code:

    <?php $image = get_post_meta($post->ID, 'thumb', true); ?>
    <a href="<?php the_permalink() ?>"><img class="thumb" src="<?php echo $image; ?>" alt="CareAce" width="140px" /></a>

    Right now, I'm trying to add some text above the thumbs like how Lifehacker does it.

    I've tried using the same method of get_post_meta. I'm able to add the text on, but am having trouble linking the text to its equivalent tag (e.g. in the custom field thumb_text, I will enter 'happy'. and WP will parse that and link it to the tag 'happy')

    I know it's a little bit out there, but will truly appreciate any help available! Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic