51 posts
  • Bought between 50 and 99 items
  • Has been a member for 7-8 years
  • United States
lorelei says

I have a small dilemma that I need to solve ASAP, like today!

I am using an audio plugin with shortcode for WP and trying to get this simple player to show up on the site’s footer, playing across on all pages. I’ve tried pasting the shortcode in my template file (footer.php) but it won’t come up no matter what I do. Works fine on pages and posts. Would like to hire someone to help me out with this.. I know there’s probably a very simple fix.. like knowing where to place the code!

The player php embed shortcode is:

 <?php do_shortcode('[sc_embed_player autoplay="true" loops="true" fileurl="http://mysite/song.mp3"]'); ?> 

My Footer file php code:

<?php get_sidebar( 'primary' ); // Loads the sidebar-primary.php template. ?>

        <!-- #main -->

        <footer id="footer">

            <div class="wrap">

                <div class="footer-content">

                    <?php do_atomic( 'footer' ); // hybrid_footer ?>

<!-- .footer-content -->

         </div>

</footer><!-- #footer -->

</div><!-- #container -->

Would be ever so grateful if some kind soul here would help me solve this asap and can Paypal $.

614 posts
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Has been a member for 2-3 years
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
Typps says

 <?php do_shortcode('[sc_embed_player autoplay="true" loops="true" fileurl="http://mysite/song.mp3"]'); ?> 

Try to add an echo before do_shortcode as follows and report back :

 <?php echo do_shortcode('[sc_embed_player autoplay="true" loops="true" fileurl="http://mysite/song.mp3"]'); ?> 

You might also want to go through this : http://codex.wordpress.org/Function_Reference/do_shortcode

51 posts
  • Bought between 50 and 99 items
  • Has been a member for 7-8 years
  • United States
lorelei says

Awesome Typps! That did it. Soooo happy! Would you be able to advise on how to get the audio not to restart on every page? I.E to have an autoresume function as on this plugin: http://wordpress.org/plugins/tierra-audio-with-autoresume/

And please PM me your Paypal email. :-)

3430 posts Ruben Bristian
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Won a Competition
  • Bought between 100 and 499 items
  • Exclusive Author
  • Referred between 500 and 999 users
+5 more
KrownThemes says
Would you be able to advise on how to get the audio not to restart on every page?

That’s impossible if the theme isn’t full AJAX.

51 posts
  • Bought between 50 and 99 items
  • Has been a member for 7-8 years
  • United States
lorelei says

What about an AJAX plugin such as this one?

http://wordpress.org/plugins/ajaxize/faq/
3430 posts Ruben Bristian
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Won a Competition
  • Bought between 100 and 499 items
  • Exclusive Author
  • Referred between 500 and 999 users
+5 more
KrownThemes says

What about an AJAX plugin such as this one? http://wordpress.org/plugins/ajaxize/faq/

It’s not that easy. You have to code the theme in a way that the header / footer stays intact and the content loads only in the content window, without refreshing. I’m not sure if there are any plugins which could do this – you need a freelancer for this task.

51 posts
  • Bought between 50 and 99 items
  • Has been a member for 7-8 years
  • United States
lorelei says

Thanks Ruben, understand.. Will have to research more on this.

614 posts
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Has been a member for 2-3 years
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
Typps says

Would you be able to advise on how to get the audio not to restart on every page? I.E to have an autoresume function as on this plugin: http://wordpress.org/plugins/tierra-audio-with-autoresume/

For full page reloads, resuming the audio player will require storing the current time of the track in a cookie and then have your player check this on load. Perhaps a feature you can request the author of this particular plugin as they are in the best position to give it to you with the least effort and you wont run into trouble when updating if new updates exist.

Here’s a quick js fiddle using the audio element http://jsfiddle.net/4pUx7/1/

If you click the button, you can skip to the 20th second in the track. So in theory it’s very much possible to achieve but I’m pretty sure making these changes to an existing player is not simple, hence why contacting the author is the best option.

Hope that was helpful.

by
by
by
by
by
by