Skip Navigation

[Résolu] Youtube Embed playlist feature not working with [wpv-post-title]

This support ticket is created Il y a 4 années et 1 mois. There's a good chance that you are reading advice that it now obsolete.

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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par alexG-4 Il y a 4 années et 1 mois.

Assisté par: Beda.

Auteur
Publications
#1604815

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

#1605277

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.

#1605569

Thanks, Beda.

I'll take it up with the plugin author.

Ce ticket est maintenant fermé. Si vous êtes un client de Toolset et que vous avez besoin d'aide, veuillez ouvrir un nouveau ticket d'assistance