Add rel attribute to lightbox in WordPress

Add this code snippet to functions.php see above topic, after which the attribute will be added to all links in the pictures rel=”lightbox”. Pay attention to that, what in 5 line, this attribute can always be changed, for different modal window scripts.

And for those who have their weight in gold and projects for yesterday, сделать модальные окошки в wordpress можно при помощи плагина FancyBox for WordPress. Для корректной работы плагина заходим в его настройки и нажимаем Revert to defaults, после чего жмем Save Changes и плагин начинает работать для всех картинок.

Use the suggested code snippet in your plugins.


Купить хостинг WordPress
WordPress tutor
Online tutoring services. List of courses I teach
  • Basic web design course;
  • Site layout;
  • General course on CMS WordPress and continuation of the course on template development;
  • Website development in PHP.
Read more on the page WordPress tutor
*/

Nikolaenko Maxim

Director of web studies ProGrafika. I am developing, website design and promotion. Always glad to new blog readers and good clients.


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Templates for WordPress
The best hosting in Ukraine
Stable hosting for Drupal