WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] edit this php snippet to show full-sz attachment?

[Resolved] edit this php snippet to show full-sz attachment?

  • Cathy Tibbles

    @multitalentedmommy

    This bit was thanks to another forum member. And it works beautifully in my theme. Now I am wondering if I can change this piece so that it will show the full-size image, instead of the thumbnail?

    <?php
    $args = array(
    'post_type' => 'attachment',
    'numberposts' => null,
    'post_status' => null,
    'post_parent' => $post->ID
    );
    $attachments = get_posts($args);
    if ($attachments) {
    foreach ($attachments as $attachment) {
    echo apply_filters('the_title', $attachment->post_title);
    the_attachment_link($attachment->ID, false);
    }
    }
    ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] edit this php snippet to show full-sz attachment?’ is closed to new replies.
Skip to toolbar