Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-statistics domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/s/serjpozw/wp-prog.ru/public_html/wp-includes/functions.php on line 6114 Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the cyr2lat domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/s/serjpozw/wp-prog.ru/public_html/wp-includes/functions.php on line 6114 Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the essential-addons-for-elementor-lite domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/s/serjpozw/wp-prog.ru/public_html/wp-includes/functions.php on line 6114 Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the translatepress-multilingual domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/s/serjpozw/wp-prog.ru/public_html/wp-includes/functions.php on line 6114 Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/s/serjpozw/wp-prog.ru/public_html/wp-includes/functions.php on line 6114 Как вывести хлебные крошки в Elementor - WP-prog

WP-prog

Как вывести хлебные крошки в Elementor

Хлебные крошки на сайте (англ. Breadcrumbs) — это навигационные цепочки, показывающие путь текущей страницы. Они облегчают навигацию пользователя на сайте. Особенно важен этот элемент в интернет-магазинах с большой вложенностью категорий товаров.

Существует много способов вывода хлебных крошек в Elementor. Перечислю те, которыми пользуюсь я при разработке сайтов для своих заказчиков:

Если у Вас установлен плагин Yoast SEO, то добавить хлебные крошки на страницу очень легко с помощью соответствующего виджета:

Хлебные крошки от Yoast SEO

Плагин All in One SEO позволяет добавить хлебные крошки на страницу Elementor с помощью шорткода. Для этого в настройках плагина нужно выставить следующие настройки:

На способе добавления хлебных крошек с помощью плагина Breadcrumb NavXT остановимся подробнее. К сожалению, плагин, количество загрузок которого 900 тыс., не предоставляет шорткод и виджет Elementor для добавления на сайт. Доступен лишь PHP-код. Все, что нам нужно – это добавить его на наш сайт. Но PHP код тоже просто так не вставить на страницу, поэтому создадим свой собственный шорткод.

Выведем хлебные крошки с помощью своего шорткода:

				
					// Код для размещения с помощью шорткода. Breadcrumb NavXT - должен быть установлен и активирован
function wpc_elementor_shortcode($atts)
{
	if (function_exists('bcn_display')) {
		bcn_display();
	}
}

add_shortcode('esa_breadcrumbs', 'wpc_elementor_shortcode');
				
			

Другой вариант, если Вы используете плагин Yoast SEO:

				
					// Код для размещения с помощью шорткода. Yoast SEO - должен быть установлен и активирован
function wpc_elementor_shortcode($atts)
{

if ( function_exists('yoast_breadcrumb') ) {
  yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );
}

add_shortcode('esa_breadcrumbs', 'wpc_elementor_shortcode');
				
			

Теперь достаточно просто вставить шорткод "esa_breadcrumbs" в нужном месте (вместо кавычек используйте квадратные скобки).

Другие материалы по WordPress можно найти здесь.

Если у Вас есть какие-либо вопросы, оставьте свой комментарий:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *