Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #836339

    Hello,
    I have one page on my website which shows a huge list of external urls.
    Some of these urls are transformed into some link previews, which leads to very huge loadtime and destroy the websites appearance.

    I tried the Disable Embeds plugin (https://de.wordpress.org/plugins/disable-embeds/) to deactivate the embed function for wordpress.
    But neither the plugin or disabling from embed function via functions.php is working with Enfold theme.
    If I use Twenty Seventeen for testing, it works!

    It seems that enfold theme is doing something with embedded links in text editor.

    Source code shows the following rendered html for one previewed website:

    <div class="avia-iframe-wrap">
    <blockquote data-secret="PgjgLYiKD5" class="wp-embedded-content">
    <p><a href="http://...">Home</a></p>
    </blockquote>
    <p style="padding-bottom: 56.3333%;"><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);" src="http://..." data-secret="PgjgLYiKD5" width="600" height="338" title="„" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p></div>

    What can I do to deactivate embed links with enfold?

    Best regards
    Stephan

    #837998

    Hey ramotzkie,
    Try adding this code to the end of your functions.php file in Appearance > Editor:

    function my_deregister_scripts(){
    wp_dequeue_script( 'wp-embed' );
    }
    add_action( 'wp_footer', 'my_deregister_scripts' );

    It worked on my localhost

    Best regards,
    Mike

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.