• I’m using the Smart Slider plugin as a gutenberg block, which uses a shortcode to insert a slider pane. It works just fine on the home page using Tove, but when I use search or an archive or category page (see the link above), the page does not render the slider and instead displays the raw shortcode. I’ve asked the plugin developer, and he says this is a theme issue: (copied from the reply and the plugin’s help documentation)

    It it up to your theme, where it processes shortcodes and where it doesn’t. As you see here:
    https://smartslider.helpscoutdocs.com/article/1945-shortcode-displays-instead-of-the-slider#theme-issue
    you can call in the content of a page, without running its shortcodes. So I suggest getting in touch with your theme’s developers about this issue, as it has to be fixed within their code.

    Theme issue
    It's also possible that your theme doesn't use WordPress' the_post() function to output the post/page content. This issue exists with for example, Illdy theme which outputs the content this way:
    
    <?php echo $static_page_content; ?>
    	
    The solution to this problem is to run the do_shortcode() function on this $static_page_content variable:
    
    <?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' );

    I tried adding the final line of code (hoping that Tove uses the the_content() function, but it didn’t make a difference.

    Any suggestions on how to fix this issue using Tove? I’d also be fine with just hiding the block altogether on the archives/search/categories pages, but I’m not sure that’s possible either, since I don’t think Tove supports customizing those pages.

    Any help would be very appreciated!

    • This topic was modified 2 years, 6 months ago by Haldan. Reason: added more

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @hblecher,

    I’d ask the plugin developer if they’ve tested the plugin with Full Site Editing themes, like Twenty-Twenty Two and Tove. Tove isn’t a classic PHP theme but uses the Full Site Editing functionality added in WordPress 5.9, so it’s possible that the plugin developers haven’t updated the plugin to work with those features yet.

    — Anders

    Thread Starter Haldan

    (@hblecher)

    @anlino Thanks Anders. I’ve just asked the plugin developers, but I’m pretty sure their answer will be yes. This is the most downloaded and up to date slider plugin on the plugin marketplace as far as I can tell, so it seems like many others are using it with Twenty-Twenty Two. But I will get back to you to confirm. Does the help article I linked above imply that the slider only works with classic PHP themes?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shortcodes not enabled on archives/search/categories’ is closed to new replies.