Support » Themes and Templates » wp-caption problem – can it be used outside of the_content?

  • 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 -->


Viewing 2 replies - 1 through 2 (of 2 total)
  • 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. 🙂

    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?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp-caption problem – can it be used outside of the_content?’ is closed to new replies.