attachment url as file url
-
New to a lot of this, so it has been a bit trying to figure this out. I have a page template that i am attempting to have the jplayer pull up an attachment and give the option to play it.
This works fine:
<?php mp3j_put( ‘[mp3j track=”https://vocalrover.com/wp-content/uploads/2015/11/Aciety-Ryan-Vollmer.mp3″ flip=”y”]’ ); ?>Now I want to pass an attachment ID into the track url.
Doing: <?php echo wp_get_attachment_url($at->ID) ?>
results in: https://vocalrover.com/wp-content/uploads/2015/11/Aciety-Ryan-Vollmer.mp3So how do I go about passing the attachment url into the mp3j shortcode? I’ve tried assigning the attachment to a php variable and js variable, and a bunch of other things with no luck. Since my knowledge is a bit limited, I am hoping someone here has had some experience.
Thanks for your time!
Ryan
- The topic ‘attachment url as file url’ is closed to new replies.