I want to use the YouTube Embed plugin (https://wordpress.org/plugins/youtube-embed/) alongside [wpv-post-title].
This shortcode call:
[youtube search="yes"]Daniel Schmachtenberger[/youtube]
creates a video playlist using "Daniel Schmachtenberger" as a search term for YouTube.
I'm trying to use this version:
[youtube search="yes"][wpv-post-title output="sanitize"][/youtube]
to dynamically create the search term, but I'm not getting a playlist
This video shows the problem
lien caché
It seems as if there might be an issue with the order in which the shortcodes are evaluated. Is there any control over that?
Thanks
Alex
The youtube shortcode you use is enclosing and hence, everything inside it is handled by that ShortCode.
It seems either it does not do_shortcode on the enclosed content, or any other issue (of that shortcode) stops wpv-post-title to work.
I suggest making a simple test with a custom shortcode to see if Toolset or ShortCodes, in general, are the issue.
For example, you can use this in your functions.php:
function bartag_func( $atts ) {
$a = shortcode_atts( array(
'foo' => 'something',
'bar' => 'something else',
), $atts );
return "foo = {$a['foo']}";
}
add_shortcode( 'bartag', 'bartag_func' );
Then add to your ShortCode (instead of using a Toolset ShortCode) this:
[bartag foo="this" bar="other"]
You should see your youtube shortcode trying to pull data for "foo = this"
If not, it means that ShortCode does not execute nested ShortCodes.
Thanks, Beda.
I'll take it up with the plugin author.