Skip Navigation

[Resolved] Registered 3rd Party Shortcode Not Rendering Properly

This thread is resolved. Here is a description of the problem and solution.

Problem:

Write [sc_embed_player] shortcode syntax in an audio field for rendering Settings "registered" 3rd party shortcode.

https://www.tipsandtricks-hq.com/wordpress-audio-music-player-plugin-4556

Solution:

The shortcode [sc_embed_player] expects fileurl value as an URL value, so you can use "raw" output attribute to provide the file URL. See detail steps here:

https://toolset.com/forums/topic/registered-3rd-party-shortcode-not-rendering-properly/#post-1159402

Relevant Documentation:

https://toolset.com/documentation/user-guides/shortcodes-within-shortcodes/

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 4 replies, has 2 voices.

Last updated by Luo Yang 2 years, 9 months ago.

Assigned support staff: Luo Yang.

Author
Posts
#1159071
compact-audio-button.jpg
compact-audio-button2.jpg

I am trying to: Correctly write shortcode syntax in an audio field for rendering Settings "registered" 3rd party shortcode.

Link to a page where the issue can be seen: Private Page

I expected to see: Rendered 3rd party audio play button view

Instead, I got: Coding behind the 3rd party audio play button shortcode. ***Play button did render in a less complicated Types shortcode, as well as with the 3rd party coding to the right of it. But still, the coding behind the 3rd party shortcode is still rendered in the View.***

Theme: Tested. Not the theme, because it renders audio play button in a less complicated shortcode as the Types audio field.

Plugin: Compact Player shortcode [sc_embed_player fileurl=""]

Read this: https://toolset.com/documentation/user-guides/shortcodes-within-shortcodes/ AND hidden link

Tried this: [sc_embed_player fileurl='[types field="audio" link="true" title="Play" style="display: none"][/types]']

Hope this helps.

#1159080

Edited post.

#1159402

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

audio-shortcode.JPG

Hello,

How do you setup the custom field "audio"? if it is a custom audio field, then you need to change your shortcode.

I have tried these steps in my localhost, it works just fine
1) Install the plugin you mentioned above
2) Create a custom audio field "audio"
3) Dashboard-> Toolset-> Settings-> Front-end Content
in section "Third-party shortcode arguments", add the shortcode name: sc_embed_player
4) Create a post, upload a mp3 file into the field "audio"
Display the shortcode [sc_embed_player], like this:

[sc_embed_player fileurl='[types field="audio" output="raw"][/types]']

It works fine, see screenshot audio-shortcode.JPG

The shortcode [sc_embed_player] expects fileurl value as an URL value, so you can use "raw" output attribute to provide the file URL. More help:
https://toolset.com/documentation/customizing-sites-using-php/functions/#audio
output:
'raw' | 'normal'(default)
‘raw’=Display raw data stored in DB. No other formatting attributes (e.g. custom separator) will be respected.

#1163228

My issue is resolved now. Thank you! Luo is EMPEROR !!!

#1167289

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

You are welcome