Shortcode displays instead of the slider
In this article
WordPress update caused issue
WordPress introduced an issue in their latest updates, which makes shortcodes not work in block themes anymore. If you have this issue, then:
- If you are a Smart Slider Pro user, update your Smart Slider.
- If you are a Smart Slider Free user, follow these instructions.
Smart Slider 3 can only show up on websites, which have valid HTML code (due to compatibility reasons with optimization plugins). So if you only see the shortcode on the page, instead of the slider there's a good chance that your HTML structure is messed up and invalid.
The HTML structure can be messed up in several ways. The most common problems:
- Missing </head> tag. Usually, this problem happens because of the template.
- Many <html>, <head> or <body> tags. Usually these kind of problems are caused by Custom HTML modules, but it can be caused by literally any other extension that outputs codes to your site.
To make the slider show up on your site, you must solve these HTML errors. To check the errors, view your page source. You can do this in lots of ways:
- right click → View Page Source, or
- type view-source: before the site's URL.(E.g: view-source:http://example.com/), or
- run a HTML validator on your site. W3C Markup Validator is pretty great.
If you're using WordPress then you could run a plugin/theme conflict test to see what causes the HTML error.
If you're using Joomla probably the problem happens because of a module, which sometimes load their own code as it's own HTML page (with the html, head and body tags). Try turning off your modules to see which one causes the problem.
Slider shortcode displays on WordPress
Slider is in a text widget
WordPress doesn't support shortcodes in the text widgets, they only appear, if your theme was coded to show them. You can try to give this option to your theme by putting this code into your theme's
add_filter( 'widget_text', 'do_shortcode' );
⚠️ Warning: If you make a mistake in the
functions.php file, both your backend and frontend will be blank, so have a backup and use FTP!
But we have our own widget, and you should use that instead.
Smart Slider 3 plugin is not enabled
If you just updated your Smart Slider 3, and now you only see the shortcode of your sliders, and not the sliders on your website, it is happening, because you need to activate your Smart Slider 3 after the update!
<?php echo $static_page_content; ?>
The solution to this problem is to run the do_shortcode() function on this
<?php echo do_shortcode($static_page_content;) ?>
If your theme uses the
the_content()function and the shortcode still not working, add the following filter to your theme's functions.php file:
add_filter( 'the_content', 'do_shortcode' );
Some plugins can unload the codes of other plugins on certain pages and posts. A Typical example is Asset CleanUp Pro: Page Speed Booster which gives option to disable plugins on all frontend pages. In their case unticking the Unload in all frontend pages & add exceptions checkbox at
Asset CleanUp Pro→
IN FRONTEND VIEW (your visitors)→
Smart Slider 3should fix the problem.
Slider shortcode displays on Joomla
Smart Slider 3's plugins are disabled
Be sure that all of the Smart Slider 3 related plugins are activated:
Their access level should be
Wrong plugin order
If you put a slider's code, like smartslider3 into an article, and you can't see it turning into the slider, only this smartslider3 is written into your article, then you have some extension changing your article's code. You should go to Extensions → Plugins, filter out the
systemplugins, and move the
Smart Slider 3 System Pluginplugin higher, maybe into the first position. This would make our shortcode to slider changing sooner, before anything else would change it.