admin管理员组文章数量:1122846
I have a page: /
I have discovered this as well: /
There is no page for that second URL, and I cannot find a way to remove it.
Any thoughts?
I have a page: https://med.uth.edu/ortho/houston-ortho-trauma/
I have discovered this as well: https://med.uth.edu/ortho/houston-ortho-trauma/embed/
There is no page for that second URL, and I cannot find a way to remove it.
Any thoughts?
Share Improve this question asked Jun 12, 2024 at 14:04 CarlosCarlos 111 bronze badge 1 |1 Answer
Reset to default 1This pages can be generated in WP, or by plugins and are intended to allow the page to be embedded on other websites. If you do not want them they can be "removed" via an .htaccess rule:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.*)/embed/?$
RewriteRule ^(.*)/embed/?$ %1 [R=301,L]
Or a custom function in your functions.php file:
function disable_embeds_code_init() {
// Remove the REST API endpoint.
remove_action('rest_api_init', 'wp_oembed_register_route');
// Turn off oEmbed auto discovery.
add_filter('embed_oembed_discover', '__return_false');
// Don't filter oEmbed results.
remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10);
// Remove oEmbed discovery links.
remove_action('wp_head', 'wp_oembed_add_discovery_links');
// Remove oEmbed-specific JavaScript from the front-end and back-end.
remove_action('wp_head', 'wp_oembed_add_host_js');
}
add_action('init', 'disable_embeds_code_init', 9999);
You can read more about oembed links here: What are the Oembed Links For?
If you check your source code you will see the links, they start with:
link rel="alternate" type="application/json+oembed"
本文标签: url ends in quotembedquot
版权声明:本文标题:url ends in "embed" 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736303932a1932053.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
/feed
to an archive URL to see it as an RSS feed, or/2
for the second page – Tom J Nowell ♦ Commented Jun 12, 2024 at 14:49