-
AuthorPosts
-
June 5, 2015 at 11:11 am #293625
Hey guys! I resolved most of my problems till I started working with audio files. My website is all about downloading my own photo, audio and video files. And I made a template with cornerstone, added the default text when making a post, download buttons etc. Now, the problem is in the post type. I got a player that is generating a waveform instead of a background image or featured image. I’ve hidden the X audio player on a single post but I kept the player on the main blog page so you could play the sound before you go to that post for download and details. Now, I’m using a third party audio player that is functioning perfectly on the single page. BUT IS THERE A WAY (not shouting, just pointing out the question) to tell the X theme to use my third party player on the main blog page instead of built in one? To use the same thing I’m using on my single page.
Here’s the main page with a test post
http://fulloffree.com/The first post is the audio post with the old player.
And I wish to use the player on this page
http://fulloffree.com/rain-and-thunder-storm-beta/So it would show on the main post page.
I tried some other players and some of them do show on the main page instead of the built in player… Don’t know how to do this. Just need to know what and where to put things so the X would use this player instead of the default.
Thanks
Mirko PernjakovicJune 6, 2015 at 4:05 am #294245Hello There,
Thanks for posting in! How did you add the audio using the 3rd party plugin? If you are using an embed code, you can just edit the audio post and insert the embed code of the audio in the field provided for the embed code as shown here: http://prntscr.com/7dqh2f
If you are using a shortcode, you need to change something in your theme. You might need this code in your child theme’s functions.php
// Featured Audio // ============================================================================= if ( ! function_exists( 'x_featured_audio' ) ) : function x_featured_audio() { $entry_id = get_the_ID(); $mp3 = get_post_meta( $entry_id, '_x_audio_mp3', true ); $ogg = get_post_meta( $entry_id, '_x_audio_ogg', true ); $embed = get_post_meta( $entry_id, '_x_audio_embed', true ); if ( $embed != '' ) { //echo do_shortcode( '[x_audio_embed class="mvn"]' . stripslashes( htmlspecialchars_decode( $embed ) ) . '[/x_audio_embed]' ); echo do_shortcode( $embed ); } else { echo do_shortcode( '[x_audio_player mp3="' . $mp3 . '" oga="' . $ogg . '" preload="metadata" autoplay="false" loop="false" class="mvn"]' ); } } endif;
Hope this helps.
June 6, 2015 at 7:16 am #294347Thanks for the fast response! The player is Zoomsounds player, third party plugin bought online. The audio is added with this shortcode and it’s hosted on my server so no embed code:
[zoomsounds_player source=”http://fulloffree.com/wp-content/uploads/2015/06/Rain-and-thunder-test.mp3″ config=”skinwavewithcomments” playerid=”3088″ waveformbg=”” waveformprog=”” thumb=”http://fulloffree.com/wp-content/uploads/2015/06/Mirkic.jpg” autoplay=”on” cue=”on” enable_likes=”on” enable_views=”on” songname=”Rain and thunder storm” artistname=””]
So, in the above post you’ve wrote, I should change the [x_audio_player mp3= with the zoomsounds_player?
I’m not really a tech guy and I would appreciate your help with this. Is there anything more I can do to help you help me, please tell me π
June 7, 2015 at 1:23 am #294789Hello There,
The code above is already customized to cater zoomsounds palyer shortcode. Just insert the shortcode in the audio embed field and it will work to display your Zoomsounds player.
Please see the screenshot: http://prntscr.com/7e2g2c
If that doesn’t work out for you, would you mind providing us the url of your site with login credentials so we can create an example for you. To do this, you can make a post with the following info:
β Link to your siteβ¨
β WordPress Admin username / password (only if necessary)Donβt forget to select Set as private reply. This ensures your information is only visible to our staff.
All the best.
June 7, 2015 at 8:14 am #294973This reply has been marked as private.June 7, 2015 at 8:21 am #294981Oh, forgot to mention that it’s not embedded from Soundcloud or anywhere else. It’s selfhosted audio.
June 7, 2015 at 9:39 am #295029This reply has been marked as private.June 7, 2015 at 10:09 pm #295356This reply has been marked as private.June 8, 2015 at 3:54 am #295592This reply has been marked as private.June 8, 2015 at 7:04 am #295717Hey guys! I managed to get the hang of it. It uses a different embed code. Not the same one for the fields above. So thank you very, very much guys! Very helpful people! Awesome support!
June 8, 2015 at 8:33 am #295793You’re most welcome.
June 9, 2015 at 8:15 am #296824This reply has been marked as private.June 9, 2015 at 6:37 pm #297424Just in case you don’t read private answers in a topic that op said it’s solved :))) It’s not solved yet π One reply up, take a look π
June 10, 2015 at 3:34 am #297735Hi Mirko,
Could you try the one suggested at reply #294245, by directly adding the embed shortcode on featured function. You will simply add the final code at your child theme’s functions.php
Thanks!
June 10, 2015 at 11:29 am #298156Ok, here’s my steps so far.
I updated my functions.php with the code you provided
http://prntscr.com/7fb3i0Then I add the shortcode here http://prntscr.com/7fe6hz
And I get this http://prntscr.com/7fe78p
And I want it to look like the player above the one I circled red!
And the player above I managed to get with this http://prntscr.com/7fe7tq
And that’s the waaaaaay around embed code that’s not working properly. That’s the shortcode for library (playlist).
Now, please have some more patience with me. Did I missed something in functions.php? Should I change something there?
I just want the player I add to a post to be visible in the same form on the main post page as featured…
Thanks again and sorry to bother you.
-
AuthorPosts