Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #293625

    Mirko P
    Participant

    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 Pernjakovic

    #294245

    Rue Nel
    Moderator

    Hello 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.

    #294347

    Mirko P
    Participant

    Thanks 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 πŸ™‚

    #294789

    Rue Nel
    Moderator

    Hello 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.

    #294973

    Mirko P
    Participant
    This reply has been marked as private.
    #294981

    Mirko P
    Participant

    Oh, forgot to mention that it’s not embedded from Soundcloud or anywhere else. It’s selfhosted audio.

    #295029

    Mirko P
    Participant
    This reply has been marked as private.
    #295356

    Rue Nel
    Moderator
    This reply has been marked as private.
    #295592

    Mirko P
    Participant
    This reply has been marked as private.
    #295717

    Mirko P
    Participant

    Hey 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!

    #295793

    Thai
    Moderator

    You’re most welcome.

    #296824

    Mirko P
    Participant
    This reply has been marked as private.
    #297424

    Mirko P
    Participant

    Just 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 πŸ™‚

    #297735

    Rad
    Moderator

    Hi 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!

    #298156

    Mirko P
    Participant

    Ok, here’s my steps so far.

    I updated my functions.php with the code you provided
    http://prntscr.com/7fb3i0

    Then 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.