• Hello,
    I created custom attachment.php

    `<?php get_header(); ?>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <?php $attachment_link = get_the_attachment_link($post->ID, true, array());?>

    <div class=”post” id=”post-<?php the_ID(); ?>”>

    <div class=”entrytext”>
    <p class=”<?php echo $classname; ?>”><?php echo $attachment_link; ?></p>
    </div>

    <?php endwhile; else: ?>

    <p>Sorry, no attachments matched your criteria.</p>

    <?php endif; ?>

    </div>

    <?php get_footer(); ?>`

    I added $attachment_link; but its link to original file as well. can someone tell me the code to get full size attached image only that do not link to any where.

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘need help for in attachment.php’ is closed to new replies.