Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 95994

kikib on "media description not showing up"

$
0
0

I'm trying to display the description of an image on my homepage. However, I'm working on my wp website by localhost. Here's my code

<div id="featured">
	 <div class="featuredtext">
        <h2><span>Featured Art Work</span></h2>
    </div>
<?php query_posts('cat=18&showposts=1'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <div id="featuredpic" class="featured_item">
    	<?php //get article_image (custom field) ?>
        <?php $image = get_post_meta($post->ID, 'featured_image', true); ?>

        <a href="<?php the_permalink(); ?>"><img src="<?php echo $image; ?>" alt="Featured Artwork" /></a>
        <span class="caption featuredtitle">
          <div id="feattitle"><h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
          </div>
          <div id="featureddescription"><?php echo $description = $image->post_content; ?>
         </div>
       </span>
    </div>
     <hr class="border" />
 </div>

<div id="featureddescription"><?php echo $description = $image->post_content; ?></div>

This excerpt was taken out of the code box to emphasis where I'm trying to post the description of a media image. But it's not showing up on the page. What do I do?


Viewing all articles
Browse latest Browse all 95994

Trending Articles