WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Attachment Pag calling the Image description (2 posts)

  1. Robert Dall
    Member
    Posted 3 years ago #

    Hi I have a question about the attachment page.

    If I use a caption on the main page which is for example is 2 or 3 words long. But the Description is much longer. Can I call the Description instead of the caption on the attachment.php template?

    So people who want to see a larger image also see a larger caption? I tried search the codex. Thinking this has been asked before but couldn't find anything that related to just calling the description and not the caption.

  2. Robert Dall
    Member
    Posted 3 years ago #

    You know you feel stupid with you ask questions on a board that make you look stupid. This is one of those time.

    I copied my image.php page from a previous build.

    In it I using the caption called.

    <?php // if ( !empty($post->post_excerpt) ) the_excerpt() ?>

    Which called the caption as I wrote it.

    But when I replaced it with the
    <?php the_content();?>

    It then gave me the description as I though I requested it.

    The other thing is I didn't have a excerpt in the main post. But yet it reverted to caption instead of being blank.

    Regardless issue closed!

Topic Closed

This topic has been closed to new replies.

About this Topic