wp-caption problem - can it be used outside of the_content? (3 posts)

  1. FionaGilbert
    Posted 6 years ago #

    Hi all,

    I have this code (below) that I am trying to use with wp-captions. But as far as I can see captions are only used in the_content. Is there a way of using outside?

    <div class="wideImage">
    	<?php // Generates image for latest post
    	$thumb = get_post_meta($post->ID, 'img-thumb', true);
    	if ($thumb == '')
    	{ ?>
    	<img src="<?php bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo c2c_random_file('/media/rotate/'); ?>&w=640&h=360&zc=1&" title="<?php the_title(); ?>" alt="<?php the_title(); ?>" />
    	<?php } else { ?>
    	<img src="<?php bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo $thumb; ?>&w=640&h=360&zc=1&" title="<?php the_title(); ?>" alt="<?php the_title(); ?>"/>
    	<?php } ?>
        </div><!-- end .wideImage -->


  2. AdamRoper
    Posted 6 years ago #

    While I am no expert, 'wp-captions' and 'the _content' are CSS classes.

    The first being a sub-class of the 2nd.

    I would suggest to start looking in the CSS for your theme for the appropriate class.

    Hope that helps some. :)

  3. FionaGilbert
    Posted 6 years ago #

    Ah no, what I mean't was that I wondered if there was anyway to reproduce and image and image captions showing outside of a post. It was something I wanted to hard code and use with TimThumb.

    Can it be done?

Topic Closed

This topic has been closed to new replies.

About this Topic