Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter enseikou

    (@enseikou)

    Nevermind, I found out I actually needed to edit the HTML code myself in the template single.php to make a clickable thumbnail. This one worked quite well:

    ?>
    <?php $attachments = new Attachments( 'attachments' ); /* pass the instance name */ ?>
    <?php if( $attachments->exist() ) : ?>
      <h3>Attachments</h3>
      <p>Total Attachments: <?php echo $attachments->total(); ?></p>
      <ul>
        <?php while( $attachments->get() ) : ?>
          <li>
            <a href="<?php echo $attachments->url(); ?>" title="<?php echo $attachments->id(); ?>: <?php echo $attachments->field( 'title' ); ?>, <?php echo $attachments->filesize(); ?>" type="<?php echo $attachments->type(); ?>/<?php echo $attachments->subtype(); ?>"><img src="<?php echo $attachments->src( 'full' ); ?>" alt="<?php echo $attachments->field( 'caption' ); ?>"></a>
          </li>
        <?php endwhile; ?>
      </ul>
    <?php endif; ?> 
    <?php

    You should make your documentation a bit more clear! And with more examples!

    • This reply was modified 6 years, 7 months ago by enseikou.
Viewing 1 replies (of 1 total)