• I am trying to add the schema markup code into a footer text widget on https://www.geminicontractor.com. It strips out the schema data after saving it. I have it working on my other site https://www.geminifloors.com where I was able to copy the code into the text widget and save.

    The only difference I see on https://www.geminicontractor.com (it may be a different version of WP), the text widget has visual and text tabs which aren’t there on the other site. I notice as soon as you go to visual and back the schema data is stripped out.

    Any way to get this to work without a plugin ?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you put shortcode in that widget then you have to parse shortcode. otherwise your have to create your widget.

    please add this code into your functions.php other wise place it in your plugin file.

    /**
     * Enable shortcode in widget
     */
    add_filter( 'widget_text', 'do_shortcode');

    Let me know from you.
    thanks

    Thread Starter madhavadasa

    (@madhavadasa)

    Thanks for reply ThemesGrove

    I’m not familiar with how to ‘parse shortcode’, or creating a widget. As for adding the code you’ve recommended to functions.php or plugin file, will it be overwritten by future updates ? Like with style.css you need a child theme to add codes and prevent overwrite.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress not saving Schema code in text wideget’ is closed to new replies.