51 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 50+ items on Envato Market
  • Located in 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 $.

736 posts
  • Has been part of the Envato Community for over 2 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+2 more
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
  • Has been part of the Envato Community for over 7 years
  • Has collected 50+ items on Envato Market
  • Located in 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. :-)

3711 posts Ruben Bristian
  • Sells items exclusively on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $500,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
+10 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
  • Has been part of the Envato Community for over 7 years
  • Has collected 50+ items on Envato Market
  • Located in United States
lorelei says

What about an AJAX plugin such as this one?

http://wordpress.org/plugins/ajaxize/faq/
3711 posts Ruben Bristian
  • Sells items exclusively on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $500,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
+10 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
  • Has been part of the Envato Community for over 7 years
  • Has collected 50+ items on Envato Market
  • Located in United States
lorelei says

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

736 posts
  • Has been part of the Envato Community for over 2 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+2 more
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.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by