M
M
Maxim Tsyplenkov2018-08-09 00:50:25
WordPress
Maxim Tsyplenkov, 2018-08-09 00:50:25

Wordpress removes links (url), and when inserting a video from youtube (deletes video url), how to fix it?

Hello.
Faced such a problem:
In a post I insert a video from YouTube:
For example:

<iframe width="560" height="315" src="https://www.youtube.com/embed/cE143fRn3pk" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

On the page: https://www.foodhere.ru/kulinarnye-recepty/recepty... instead of the video, a frame and the main page of the site are displayed:
video-not.png
When viewing the html code of the page, it is clear that for some reason the URL has been cut out:
<iframe width="560" height="315" src="https:/" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

But when editing the page, the code is normal.
The same thing happens when you insert a link into a post
. For example, I insert a link:
<a title="Такос" href="https://www.foodhere.ru/services-view/takos">Такос</a>

But on the page: https://www.foodhere.ru/kulinarnye-recepty/zakuski... instead of a link to Tacos, a link to the main page of the site is displayed.
When viewing the source code of the page, you can see that the link was cut: When editing the page in the admin panel, the link is normal. The problem arose suddenly and only applies to new posts. Posts published earlier work fine. For example, the page: https://www.foodhere.ru/kulinarnye-recepty/vypechk... It has a link to: "Puff pastry stuffed with mushrooms" and it works fine. Tell me how to fix this problem?
<a title="Такос" href="https:/">Такос</a>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor Vorotnev, 2018-08-09
@HeadOnFire

For starters, YouTube is embedded via Embed, not iframe - just paste the link to the video and WP will do the rest.
As for URL stripping, see what plugins you have, check the code that hangs on the_content hook.

A
Alexander Belikov, 2018-08-09
@AlexanderBelikov

Maybe update WordPress to the latest version? Well, or ... I saw such a plugin, I don’t remember the name, in general, it fixes website errors.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question