• Resolved Don Betts

    (@dbetts)


    Hi,

    I’m using ACF to supply the url for the fileurl parameter of the shortcode. I have the filed set to return the file url and the player shows and the file plays when clicked, so all is working, but I get the following error:

    Compact Audio Player Error! You must enter the mp3 file URL via the “fileurl” parameter in this shortcode. Please check the documentation and correct the mistake.

    Here’s my code in the tmeplate:
    <?php echo do_shortcode( '[sc_embed_player fileurl="'.get_sub_field('track_sample').'"]' ); ?>

    The shortcode is pulling in the correct url, but still getting the error message.

    Any insight appreciated.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Don Betts

    (@dbetts)

    Update: the message goes away when I add a second file (using the ACF Repeater). In this case, I will always have more than one file, but still curious about why I got the message.

    Thanks

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, what if you try the following sample code.

    <?php echo do_shortcode('[sc_embed_player fileurl="URL OF THE MP3 FILE"]'); ?>

    Does the above work for you?

    Regards

    Thread Starter Don Betts

    (@dbetts)

    That worked to remove the message.

    Also, when I switch back to my original code and only input one file in the ACF repeater it no longer gives the warning.

    Thanks for the help – marking resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘ACF Shortcode Variable shows error’ is closed to new replies.