Okay
  Public Ticket #3243885
Generating short code for Divi
Closed

Comments

  • Ben Watts started the conversation

    I'm a Divi user. I've customized the mp3 player visually on a new page, but cannot generate short code for what I've built. I'm trying to figure out how to generate short code and then integrate with a Divi layout. So 1) can I generate short code for what I've built? OR 2) what's the best way to integrate Sonaar mp3 player within Divi? 

  •  1,114
    Max replied

    Hi, 

    See this article for our shortcode and its attributes https://sonaar.io/docs/add-audio-player-with-shortcode/


    Tell me if it works 

    Thanks,


    Max from the Sonaar.io Crew

  • Ben Watts replied

    Thanks, Max. Yes, I'd read that article a few times, but was still wanting to find existing shortcode for an already customized audio player so I didn't have to customize via shortcode. Divi doesn't let you see the results of your shortcode changes until you save and view live. Finally found out how to do it. Here were my steps: 

    1. Create a "New Page" in WP. 
    2. Add the basic audio player shortcode to the new page using the article in the link from your post below.
    3. Customize the audio player using the player design options in the player settings panel on the right.
    4. Click on the 3 dot "Options" drawer in the top-right. 
    5. Switch to "Code Editor" view. 
    6. Copy the short code provided for the customized audio player. 
    7. Add a new page in WP using a Divi layout or go to an existing Divi page. 
    8. Enable the Visual Builder and create a new section. 
    9. Paste the short code into the code widget and "Save" changes. 
    10. Exit Visual Builder and check the layout. 

    I was concerned that the audio player wouldn't auto populate additional tracks added to my playlist, but it did. So, seems to have worked so far. If there's an easier way to do this, I'd love to hear it. Would be nice to have more seamless integration for Divi users in a future update, but otherwise love the look and functionality of the player.

  •  1,114
    Max replied

    Thanks for your input. Ill pass your message to our dev team.

    Have a great day


    Thanks,


    Max from the Sonaar.io Crew