Answer the question
In order to leave comments, you need to log in
Why doesn't shortcode work in code?
I use WordPress. Through the page editor, in the Text section, entered the following content:
<div id='plyr-youtube' data-type="youtube" data-video-id="[urlparam param='ytid' /]"></div>
Answer the question
In order to leave comments, you need to log in
If the shortcode does not work, then when inspecting the element, there should be nothing inside data-video-id=""... If there is at least something inside the quotes, then the shortcode is working.
Another question is why it did not perform the desired action, it depends on what exactly it outputs and in what form ....
I can say 100% that if inside the HTML in the TEMPLATE you use
.......data-video-id="<?php echo do_shortcode('[urlparam param='ytid' /]');?>" .....
, then it will work
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question