1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Is it possible to show text below my images?

Discussion in 'HTML & Website Design' started by toxictaz, Sep 15, 2011.

  1. #1
    I am using the theme 'Css Gallery' by os designer. I want to show some excerpt from the post below each image. Is it possible?
    http://freelogosdownload.com
     
    toxictaz, Sep 15, 2011 IP
  2. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #2
    Short answer is Yes, it can be achieved.
    Within the post loop, (I see this is WordPress) add the "text" (I assume this would be a custom field value or the post excerpt) right above the following lines:
    			<div class="clear"></div>
    						</div><!-- Item Div -->
    Code (markup):
     
    Clive, Sep 15, 2011 IP
  3. SiNfuLAndroid

    SiNfuLAndroid Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You Can Try This . it should work ...
     
    SiNfuLAndroid, Sep 16, 2011 IP
  4. toxictaz

    toxictaz Member

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #4
    Thanks guys. But I was wondering if it is possible to show different text below different images. Right now, whatever text is entered above the code gets displayed below every images.
     
    toxictaz, Sep 17, 2011 IP
  5. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #5
    To have different text show under each image, save that text in form of custom post field, and then use the following code to output the values:
    echo get_post_meta($post->ID, 'enter_custom_field_name_here', true);
    PHP:
     
    Clive, Sep 18, 2011 IP
  6. woody allen

    woody allen Peon

    Messages:
    263
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    you can always set a div class for it to be able to do that. By the way, what would you like to include in? Caption? or just standard text?
     
    woody allen, Sep 18, 2011 IP
  7. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #7
    How would you describe a "caption" vs "standard text"?
     
    Clive, Sep 18, 2011 IP
  8. toxictaz

    toxictaz Member

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #8
    Did some googling and came accross this code
    <div class="excerpt">
        <?php the_excerpt('Read the rest of this entry &raquo;'); ?>
    </div>
    PHP:
    and my job is done. Thanks guys, I thought it was impossible!
     
    toxictaz, Sep 20, 2011 IP