There are several posts about this, - but I suspect that it has changed after Gutenberg, since I can't get either of the methods to work.
I'm trying to stop WordPress embedding links, when written in a post. I just want the regular link to display... Nice and blue as always. But it converts it to an Embed URL-object.
Attempt 1) I've tried:
function WPSE_dequeue_scripts(){
wp_deregister_script('wp-embed');
}
add_action( 'wp_enqueue_scripts', 'WPSE_dequeue_scripts' );
Didn't work. I can still see the wp-embed.min.js being loaded in the network-developer tab:
Attempt 2) I've also tried:
function WPSE_remove_shiftnav_assets(){
remove_action( 'wp_enqueue_scripts' , 'wp-embed' , 9999 );
}
add_action( 'wp' , 'remove_shiftnav_assets' );
Even though I would strongly prefer something in my functions.php-file to remove this, then I've also tried this plugin here without any result either.
How do I stop it from auto-converting links to that Embed URL?
There are several posts about this, - but I suspect that it has changed after Gutenberg, since I can't get either of the methods to work.
I'm trying to stop WordPress embedding links, when written in a post. I just want the regular link to display... Nice and blue as always. But it converts it to an Embed URL-object.
Attempt 1) I've tried:
function WPSE_dequeue_scripts(){
wp_deregister_script('wp-embed');
}
add_action( 'wp_enqueue_scripts', 'WPSE_dequeue_scripts' );
Didn't work. I can still see the wp-embed.min.js being loaded in the network-developer tab:
Attempt 2) I've also tried:
function WPSE_remove_shiftnav_assets(){
remove_action( 'wp_enqueue_scripts' , 'wp-embed' , 9999 );
}
add_action( 'wp' , 'remove_shiftnav_assets' );
Even though I would strongly prefer something in my functions.php-file to remove this, then I've also tried this plugin here without any result either.
How do I stop it from auto-converting links to that Embed URL?
Share Improve this question asked Jun 8, 2019 at 13:57 ZethZeth 9282 gold badges13 silver badges43 bronze badges 5 |1 Answer
Reset to default 0The quickfix: Copy the link into a text-editor and add a space before it. And then copy that new text (with the prefixed space) into whereever you want it.
wp-embed
is just a library for displaying embeds, it isn't the part of the block editor that changes URLs into embeds – Tom J Nowell ♦ Commented Jun 8, 2019 at 23:55