• Resolved cmykbkk

    (@cmykbkk)


    We are trying to use your slider to display some Embedly cards, but when we paste the code into the slider and save it, it’s stripping things out (script js for example) … is there any way to prevent it from rewriting any code?

    EXAMPLE:

    <h4>SEO Consultation [Standard]</h4><p>Our standard audit can provide you with a complete insight into your website’s online presence, compare metrics that matter against your competitors, and help detect opportunities that can increase your overall web performance.</p>

    <script async src=”//cdn.embedly.com/widgets/platform.js” charset=”UTF-8″></script>

    GETS STRIPPED DOWN TO:

    <h4>SEO Consultation [Standard]</h4>
    <p>Our standard audit can provide you with a complete insight into your website’s online presence, compare metrics that matter against your competitors, and help detect opportunities that can increase your overall web performance.</p>

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author simonpedge

    (@simonpedge)

    Yes, there is a solution – have a look at this topic:
    https://www.ads-software.com/support/topic/slides-wont-save-video-iframe-code/

    So try adding this to your “functions.php” file of your theme:

    function sa_allow_script_filter( $allowedposttags ) {
    
    	// Only change for users who can publish posts
    	if ( !current_user_can( 'publish_posts' ) ) return $allowedposttags;
    
    	// Allow iframes and the following attributes
    	$allowedposttags['script'] = array(
    		'async' => true,
    		'src' => true,
    		'charset' => true,
    	);
    
    	return $allowedposttags;
    }
    add_filter( 'wp_kses_allowed_html', 'sa_allow_script_filter' );
    • This reply was modified 2 years, 11 months ago by simonpedge.
    Thread Starter cmykbkk

    (@cmykbkk)

    Unfortunately, we still couldn’t get it to stop stripping things.

    We also tried a different way, creating custom shortcodes for each embedly link, then using the shortcode in the slider, but that didn’t work either.

    Plugin Author simonpedge

    (@simonpedge)

    Regarding the shortcode, did you tick the ‘Allow Shortcodes‘ checkbox (under “Slider Settings”)?

    Thread Starter cmykbkk

    (@cmykbkk)

    Yeah, had the shortcode option selected.

    As it stands, we couldn’t get Embedly embeds working in the slider, so we have reverted back to using iFramely embeds which work fine out of the box with the slider with no modifications needing to be made.

    Thanks for the help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘stripping of content’ is closed to new replies.