html in image description on attachment page?
-
I’m playing with the attachment page (image.php in this case) and managed to get the image (with link to full size) and the description to show (with the_content() ) example page: https://www.shamelessreading.com/romance-ebook-erotica-blog/bound-by-your-touch/attachment/1416592636/
But I swear I used to be able to use HTML in the description text and it would show up as working HTML and not the html written out. ?? I’m not sure what I did, but now it’s like this. Any suggestions? Code for said section of image.php page as it stands, below:
?<?php get_header(); ?> <div id="content"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><?php the_title(); ?></h2> <div class="entry"> <?php if (wp_attachment_is_image($post->id)) { $att_image = wp_get_attachment_image_src( $post->id, "medium"); ?> <p class="attachment"> <a href="<?php echo wp_get_attachment_url($post->id); ?>" title="<?php the_title(); ?>"> <img src="<?php echo $att_image[0];?>" width="<?php echo $att_image[1];?>" height="<?php echo $att_image[2];?>" class="attachment-medium" alt="<?php $post->post_excerpt; ?>" /> </a> </p> <?php the_content() ?> <?php } ?> </div> </div>
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘html in image description on attachment page?’ is closed to new replies.