Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $material = get_field('materialy');
- ?>
- <h2 class="page_section_title text_center"><?php echo $material['tytul']; ?></h2>
- <div class="files_all">
- <?php foreach($material['pliki'] as $plik){ ?>
- <div class="file_box">
- <?php
- $attachment_id = $plik['plik'];
- $filesize = filesize( get_attached_file( $attachment_id ) ); // file size
- $filename_only = basename( get_attached_file( $attachment_id ) ); // Just the file name
- $filetype = wp_check_filetype($filename_only); // file type ?>
- <?php echo $filesize; ?>
- <?php echo $filetype['ext']; ?>
- <?php echo $filename_only; ?>
- <a class="file_download text_center" download href=" <?php echo wp_get_attachment_url( $attachment_id ); ?>"><?php _e('Pobierz','muzeum'); ?> </a>
- </div>
- <?php } ?>
- </div>
Add Comment
Please, Sign In to add comment