WordPress.org

Ready to get started?Download WordPress

Forums

Audio Player
Does audio-player work with do_shortcode (5 posts)

  1. koozzz
    Member
    Posted 12 months ago #

    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.

    example:
    <?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.

    Thanks.

    http://wordpress.org/plugins/audio-player/

  2. koozzz
    Member
    Posted 12 months ago #

    test page removed from previous post

  3. togaherer
    Member
    Posted 12 months ago #

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

  4. koozzz
    Member
    Posted 12 months ago #

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

    <?php
    /**
     * 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>
    		</header>
    
    		<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 -->
  5. koozzz
    Member
    Posted 11 months ago #

    resolved via work-a-round!

    used experimental method:
    insert_audio_player('[audio:filename.mp3]')

    See test page.

    work-a-round from wordpress forum topic

Reply

You must log in to post.

About this Plugin

About this Topic