Support » Plugin: Audio Player » Does audio-player work with do_shortcode

  • I am looking to dynamically change the mp3 filename to play through using php and was planning to utilize the do_shortcode function in custom page template to do so.

    <?php echo do_shortcode('[audio:filename.mp3]'); ?>

    The player appears but is unable to locate filename.mp3
    Test Page

    Does plug-in work with do_shortcode or is there an alternative.


Viewing 4 replies - 1 through 4 (of 4 total)
  • test page removed from previous post

    Where we put this code. Can you tell me plz.

    i tried a number of places and it is currently in the equivalent of content-page of the most current twenty twelve theme

     * The template used for displaying page content in page.php
     * @package WordPress
     * @subpackage Twenty_Twelve
     * @since Twenty Twelve 1.0
    	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    		<header class="entry-header">
    			<h1 class="entry-title"><?php the_title(); ?></h1>
    		<div class="entry-content">
    		<?php echo do_shortcode('[audio:filename.mp3]'); ?>
    			<?php the_content(); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
    		</div><!-- .entry-content -->
    		<footer class="entry-meta">
    			<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
    		</footer><!-- .entry-meta -->
    	</article><!-- #post -->

    resolved via work-a-round!

    used experimental method:

    See test page.

    work-a-round from wordpress forum topic

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Does audio-player work with do_shortcode’ is closed to new replies.