Vote media items (mp3 files) on a page
-
I am using the Kodex Posts likes plugin on THIS page, that displays mp3 files with the help of MP3-jPlayer plugin.
The MP3-jPlayer plugin displays mp3 files from the WordPress media library if the code below is in the custom post:
<ul class="podcasts"> <li>[mp3j track="https://urbansunsets.com/wp-content/uploads/2017/03/urban-sunsets-program-five.mp3" volslider='n']</li> <li>[mp3j track="https://urbansunsets.com/wp-content/uploads/2017/03/urban-sunsets-program-four.mp3" volslider='n']</li> <li>[mp3j track="https://urbansunsets.com/wp-content/uploads/2017/03/urban-sunsets-program-three.mp3" volslider='n']</li> <li>[mp3j track="https://urbansunsets.com/wp-content/uploads/2017/03/urban-sunsets-program-two.mp3" volslider='n']</li> <li>[mp3j track="https://urbansunsets.com/wp-content/uploads/2017/03/urban-sunsets-program-one.mp3" volslider='n']</li> </ul>
I want to upvote (like) every track on the page, instead of the entire page (which is the plugin’s default functionality).
I came up with:
<div id="tracks_container"> <?php the_content(); echo do_shortcode('[kodex_post_like_buttons]'); ?> </div>
The result of the code above is a single pair of buttons that visitors can use to like or dislike the entire (custom) post, not individual mp3s.
Can I split
the_content();
into list items (mp3 players in the front-end) and addecho do_shortcode('[kodex_post_like_buttons]');
after each list item? How?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Vote media items (mp3 files) on a page’ is closed to new replies.