do_shortcode not working - Wordpress Solution
[Solved] - do_shortcode not working - Wordpress Solution |
---|
Try following codes |
I've got a NextGen Gallery (with Smooth Gallery) that I need to keep out of the edit box. So I want to install the shortcode on a page template. The code that's meant to do that is:
But it's not working. It returns what's inside the quotes, brackets and all, but does not show me the gallery. Any ideas? UPDATE: appears to be a bug in Smooth Gallery plugin. But if anyone knows a fix/workaround, I'd love to know it. Thanks! Solution - 1That is not a shortcode, I know it looks like one but it's really not. You can use this instead: Good luck Solution - 2What's inside the function all is returned by do_shortcode function if there are no shortcodes defined in WordPress. Adn this can happen if you are making a call before the plugins executed their actions (usually before init()), or plugin didn't registered shortcode in the first place. Without debugging I can't tell you exactly what is the cause. Solution - 3your problem is not so clear to me but i can give you some example of using do_shortcode here is some code- its a sample use of shortcode If you want a specific gallery to display a configuration other than your default one, you can use: [smooth=id:xx; width:xx; height:xx; timed:xx; delay:xx; transition:xx; arrows:xx; info:xx; carousel:xx; text:xx; open:xx; links:xx; margin:; align:;] here, id: The id you were already using on [ gallery=id ] width: Width of your image container height: Height of your image container timed: true/false to slideshow your images delay: Time in miliseconds before moving to the next image transition: Animation when moving to the next image: fade, fadeslideleft, continuoushorizontal, continuousvertical, crossfade, fadebg arrows: true/false to see the arrows for next/previous images info: true/false to show the image description carousel: true/false to see all thumbnails text: Text relative to the Carousel open: true/false to show the carousel opened/closed links: true/false to click on the image and open the original image alone margin: Distance from the gallery border to the text align: Gallery alignment: left, right, center, float_left, float_rightIn your case, you can use any option above and in any order: There might be some compatibility issue.. For compatibility with old versions, you can also use: Ex.
|
Date: 2022-10-21 05:22:44 |
Category: Wordpress |