Answer the question
In order to leave comments, you need to log in
How to beat tag replacement in wordpress?
Hello again. I think we all know how the visual editor in WordPress works with p and br, and in general how terrible it is in terms of code replacement. I faced such a problem - there are cards on the site, and the link should be to the entire block
<div class="card ves" onclick="location.href='program#1'">
<div class="overlay">
<div class="image"><img class="alignnone size-full wp-image-23" src="http://eatness.ru/wp-content/uploads/2016/01/ves.jpg" alt="balans" width="325" height="194" /></div>
<p class="titlecard">Снижение веса</p>
</div>
Answer the question
In order to leave comments, you need to log in
День добрый.
Вам нужен вот такой плагин https://wordpress.org/plugins/raw-html/
Вам нужно в TinyMCE добавить список разрешенных аттрибутов. Вот так примерно:
https://vip.wordpress.com/documentation/register-a...
И удаление по-умолчанию в TinyMCE аттрибутов - штука не лишняя, уж поверьте. Особенно, если какая-нибудь девочка-редактор наполняет сайт, копируя инфу с других сайтов, где как раз могут быть прописаны всякие onlick и т.п. Ведь в редактор вставится всё, включая html-разметку. А потом окажется, что на сайте-доноре в onclick какой-то криворукий верстала впихнул отправку формы или еще что нибудь. Будете потом гадать - почему это при клике на казалось бы обычную ссылку в посте у вас ошибки в консоли.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question