use shortcode [video_popup url=”” text=”” auto=””] with php syntax
-
Hello,
I am newbie to php and wordpress.
I am interested in your code but I do not know how to use do_shortcode().
My website use this syntax to get the youtube id automatically:<?php $videos= get_post_meta($post->ID, “youtube_id”, $single = true); mostrar_trailer_iframe($videos) ?>
I don’t know how to put it inside you shortcode:[video_popup url=”” text=”” auto=””]
EX;
I tried to put it like this:
[video_popup url=”<?php $videos= get_post_meta($post->ID, “youtube_id”, $single = true); mostrar_trailer_iframe($videos) ?> “]and of course there will be error:
Parse error: syntax error, unexpected ‘?’Can you help me to use this?
Thank you!
The topic ‘use shortcode [video_popup url=”” text=”” auto=””] with php syntax’ is closed to new replies.