In the template I'm opening a website using WordPress, a part of the HTML code is created in JS . I want to use a slideshow in that particular part of the website. I have a shortcode for that slide show I searched for the theme's documentation, but they are saying that without big optimization it is impossible, I still think that there should be a way around it, but not me Know how to So my question is how is the use of shortcodes in JS.
Shortcode:
[metaslider id = 274]
JS to create HTML structure:
preview.prototype = {create: function () {// create preview structure: this $ Title = $ ('& lt; h3 & gt; & lt; / h3 & gt;';); this. $ Description = $ ('<' & gt; & lt; / p & gt; '); $ Href = $ (Go to & lt; div & gt; & lt; a href = "#" & gt; Website & lt; / a & gt; & lt; / div & gt; '); $ = $ ('& Lt; div class = "og-detail"> gt; & lt; / div & gt;'). Append (this. $ Title, this. $ Description, this. $ Href); This $ loading = $ ('& lt; div class = "ogg-loading"> gt; & lt; / div & gt;'); $ Fullimage = $ ('& lt; div class = "og-flume"> gt; & lt; / div & gt;'). Append (this. $ Loading); This $ closePreview = $ ('& lt; span class = "ogg-off"> gt; & lt; / span & gt;'); $ PreviewInner = $ ('div class = "og-expander-inner"> ')) .Append (this. $ ClosePreview, this. $ Fullimage, $. ); this. $ PreviewEl = $ ('& lt; div class = "Ogg-Extender" & gt; & lt; / div & gt;') .append (this. $ PreviewInner); // Add a preview element to this item. $ Item.append (this.getEl ()); // Set the transition and item for preview (support) {this.setTransition (); I have not tried my best: this $ fullimage = $ ('& lt; div class = "og-fullimg" & gt;'. & Lt ;? php echo dow_shortcode ("[metaslider ID = 274] ");? & Gt;. & Lt; / div & gt; ') .Append (this. $ Loading);
I hope there is a way to solve my problem ...
You can Input slideshows without using any shortcode code. Read the documentation that runs on your slideshow script.
PS Metaslider uses scripts
No comments:
Post a Comment