This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
nikolark 969c63c752 New style wordpress
This enables automagic updates of WP

- Delete wordpress install
- Move theme(s) to top
- Move local plugins to ./plugins
- Simplify i18n
2017-07-05 01:03:17 +02:00

29 lines
576 B
PHP

<?php
/**
* Audio player.
*
* Displays an audio player for every audio attachment to the current post.
*/
// Fetch all audio attachements
$attachments = get_children(
array(
'post_parent' => $post->ID,
'post_status' => 'inherit',
'post_type' => 'attachment',
'post_mime_type' => 'audio',
'order' => 'ASC',
'orderby' => 'menu_order'
)
);
// Loop through each attachment
foreach ( $attachments as $attachment ) {
echo "<p>Hei!</p>";
// Display the audio player
print "<pre>";
the_attachment_link( $attachment->ID , false );
print "<pre>";
}