Bread crumbs breadcrumb. Wordpress Breadcrumb Plugin Review

Breadcrumbs are an important element of a website's navigation and enhance its usability. This is especially true for sites with a complex structure. I unfortunately (or maybe not unfortunately) don't use them on most of my sites, probably because they have too simple a structure (for a site like this, they don't seem to be needed) .

When I solve a problem on a WordPress site, I always I try to avoid plugins where possible. Often the same task can be solved with less code and is less resource intensive than using plugins.

Feature Features

    The complete chain of links is displayed to the current page. For example, if the current page is in a second-level category, then the chain will look like this:

    In all solutions that I have seen (with the exception of plugins), such a chain looked like this:

    Those. one link is lost.

    The “crumbs” for the pages look the same for me. For example, for a page of the 3rd level of nesting, the chain will be like this:

    Home > Level 1 Page > Level 2 Page > Level 3 Page

  • Breadcrumbs are displayed for the following types of pages on a WordPress site:

    • page navigation from the main page (like site.ru/page/2/);
    • heading archive;
    • tag archive;
    • archive per day;
    • monthly archive;
    • archive for the year;
    • author's archive;
    • custom record type;
    • page;
    • fast;
    • searching results;
    • 404 error page.
  • A page number is added if it is the 2nd or more page of the archives.
  • You can specify any separator character between links.
  • You can set the text for the Home link.
  • Schema.org micro-markup integrated.

Breadcrumb feature for WordPress (updated: 03/03/2019)

/* * Breadcrumbs for WordPress * Author: Dimox * Version: 2019.03.03 * License: MIT */ function dimox_breadcrumbs() ( /* === OPTIONS === */ $text["home"] = " Home"; // text of the link "Home" $text["category"] = "%s"; // text for the category page $text["search"] = "Search results for the query "%s""; // text for the page with search results $text["tag"] = "Posts tagged with '%s'"; // text for the tag page $text["author"] = "Articles by author %s"; // text for the page author $text["404"] = "Error 404"; // text for page 404 $text["page"] = "Page %s"; // text "Page N" $text["cpage"] = " Comment page %s"; // text "Comment page N" $wrap_before = "

"; // closing wrapper tag $sep = " "; // separator between crumbs $before = " "; // tag before the current "baby" $after = ""; // tag after the current breadcrumbs $show_on_home = 0; // 1 - show breadcrumbs on the home page, 0 - don't show $show_home_link = 1; // 1 - show the Home link, 0 - don't show $show_current = 1; // 1 - show current page title, 0 - don't show $show_last_sep = 1; // 1 - show last separator when current page title is not displayed, 0 - don't show /* === END OF OPTIONS === */ global $post; $home_url = home_url("/"); $link = " "; $link .= " %2$s"; $link .= " "; $link .= " "; $parent_id = ($post) ? $post->post_parent: ""; $home_link = sprintf($link, $home_url, $text["home"], 1); if (is_home() || is_front_page( )) ( if ($show_on_home) echo $wrap_before . $home_link . $wrap_after; ) else ( $position = 0; echo $wrap_before; if ($show_home_link) ( $position += 1; echo $home_link; ) if (is_category ()) ( $parents = get_ancestors(get_query_var("cat"), "category"); foreach (array_reverse($parents) as $cat) ( $position += 1; if ($position > 1) echo $sep; echo sprintf($link, get_category_link($cat), get_cat_name($cat), $position); ) if (get_query_var("paged")) ( $position += 1; $cat = get_query_var("cat"); echo $sep .sprintf($link, get_category_link($cat), get_cat_name($cat), $position); echo $sep . $before .sprintf($text["page"], get_query_var("paged")) .$ after; ) else ( if ($show_current) ( if ($position >= 1) echo $sep; echo $before . sprintf($text["category"], single_cat_title("", false)) . $after; ) elseif ($show_last_sep) echo $ sep; ) ) elseif (is_search()) ( if (get_query_var("paged")) ( $position += 1; if ($show_home_link) echo $sep; echo sprintf($link, $home_url . "?s=" . get_search_query (), sprintf($text["search"], get_search_query()), $position); echo $sep . $before . sprintf($text["page"], get_query_var("paged")) . $after; ) else ( if ($show_current) ( if ($position >= 1) echo $sep; echo $before . sprintf($text["search"], get_search_query()) . $after; ) elseif ($show_last_sep) echo $sep; ) ) elseif (is_year()) ( if ($show_home_link && $show_current) echo $sep; if ($show_current) echo $before . get_the_time("Y") . $after; elseif ($show_home_link && $show_last_sep ) echo $sep; ) elseif (is_month()) ( if ($show_home_link) echo $sep; $position += 1; echo sprintf($link, get_year_link(get_the_time("Y")), get_the_time("Y") , $position); if ($show_current) echo $sep . $before . get_the_time("F") . $after; elseif ($show_last_sep) echo $sep; ) elseif (is_day()) ( if ($show_home_link) echo $sep; $position += 1; echo sprintf($link, get_year_link(get_the_time("Y")), get_the_time("Y"), $position) . $sep; $position += 1; echo sprintf($link, get_month_link(get_the_time("Y"), get_the_time("m")), get_the_time("F"), $position); if ($show_current) echo $sep . $before. get_the_time("d") . $after; elseif ($show_last_sep) echo $sep; ) elseif (is_single() && ! is_attachment()) ( if (get_post_type() != "post") ( $position += 1; $post_type = get_post_type_object(get_post_type()); if ($position > 1) echo $ sep; echo sprintf($link, get_post_type_archive_link($post_type->name), $post_type->labels->name, $position); if ($show_current) echo $sep . $before. get_the_title() . $after; elseif ($show_last_sep) echo $sep; ) else ( $cat = get_the_category(); $catID = $cat->cat_ID; $parents = get_ancestors($catID, "category"); $parents = array_reverse($parents); $parents = $catID; foreach ($ parents as $cat) ( $position += 1; if ($position > 1) echo $sep; echo sprintf($link, get_category_link($cat), get_cat_name($cat), $position); ) if (get_query_var( "cpage")) ( $position += 1; echo $sep . sprintf($link, get_permalink(), get_the_title(), $position); echo $sep . $before . sprintf($text["cpage"], get_query_var("cpage")) .$after; ) else ( if ($show_current) echo $sep . $before . get_the_title() . $after; elseif ($show_last_sep) echo $sep; ) ) ) elseif (is_post_type_archive() ) ( $post_type = get_post_type_object(get_post_type()); if (get_query_var("paged")) ( $position += 1; if ($position > 1) echo $sep; echo sprintf($link, get_post_type_archive_link($post_type- >name), $post_type->label, $position); echo $sep . $before . sprintf($text["page"], get_query_var("paged")) . $after; ) else ( if ($show_home_link && $show_current) echo $sep; if ($show_current) echo $before . $post_type->label . $after; elseif ($show_home_link && $show_last_sep) echo $sep; ) ) elseif (is_attachment()) ( $parent = get_post($parent_id); $cat = get_the_category($parent->ID); $catID = $cat->cat_ID; $parents = get_ancestors($catID, "category" ); $parents = array_reverse($parents); $parents = $catID; foreach ($parents as $cat) ( $position += 1; if ($position > 1) echo $sep; echo sprintf($link, get_category_link ($cat), get_cat_name($cat), $position); ) $position += 1; echo $sep .sprintf($link, get_permalink($parent), $parent->post_title, $position); if ($ show_current) echo $sep . $before . get_the_title() . $after; elseif ($show_last_sep) echo $sep; ) elseif (is_page() && ! $parent_id) ( if ($show_home_link && $show_current) echo $sep; if ($show_current) echo $before .get_the_title() .$after; elseif ($show_home_link && $show_last_sep) echo $sep; ) elseif (is_page() && $parent_id) ( $parents = get_post_ancestors(get_the_ID()); foreach ( array_reverse($parents) as $pageID) ( $position += 1; if ($position > 1) echo $sep; echo sprintf($lin k, get_page_link($pageID), get_the_title($pageID), $position); ) if ($show_current) echo $sep . $before. get_the_title() . $after; elseif ($show_last_sep) echo $sep; ) elseif (is_tag()) ( if (get_query_var("paged")) ( $position += 1; $tagID = get_query_var("tag_id"); echo $sep . sprintf($link, get_tag_link($tagID), single_tag_title("", false), $position); echo $sep . $before. sprintf($text["page"], get_query_var("paged")) . $after; ) else ( if ($show_home_link && $show_current) echo $sep; if ($show_current) echo $before . sprintf($text["tag"], single_tag_title("", false)) . $after; elseif ($show_home_link && $show_last_sep) echo $sep; ) ) elseif (is_author()) ( $author = get_userdata(get_query_var("author")); if (get_query_var("paged")) ( $position += 1; echo $sep . sprintf($link, get_author_posts_url($author->ID), sprintf($text["author"], $author->display_name), $position); echo $sep . $before . sprintf($text["page" ], get_query_var("paged")) .$after; ) else ( if ($show_home_link && $show_current) echo $sep; if ($show_current) echo $before .sprintf($text["author"], $author- >display_name) .$after;elseif ($show_home_link && $show_last_sep) echo $sep; ) ) elseif (is_404()) ( if ($show_home_link && $show_current) echo $sep; if ($show_current) echo $before .$ text["404"] .$after; elseif ($show_last_sep) echo $sep; ) elseif (has_post_format() && ! is_singular()) ( if ($show_home_link && $show_ current) echo $sep; echo get_post_format_string(get_post_format()); ) echo $wrap_after; ) ) // end of dimox_breadcrumbs()

The function must be placed in the functions.php file of your WordPress theme. After that, in the place of the template where you want to display "breadcrumbs", add the following code:

The only thing left to do now is style them with CSS. To do this, the .breadcrumbs class is provided for the breadcrumbs block, .breadcrumbs__separator for the separator, and .breadcrumbs__current for the current breadcrumbs.

Hello! I continue to cover super useful plugins for the wordpress system. Today I will tell and show you how to install breadcrumbs on your WordPress site very simply and quickly. What is Bread Crumbs? Breadcrumbs show the path you have taken on the site, from the first page to the current one. For example, you went to the site on the Main page, then I will go to the “Household goods” section, then you opened the “How to milk a cow” entry, etc.

All of these pages and links to them will be displayed in breadcrumbs. Breadcrumbs are needed primarily for the convenience of users so that they can quickly return to the page or category they need. But of course, breadcrumbs have a positive effect on the SEO promotion of the site. That is, due to breadcrumbs, the indicator of the behavioral factor on your site can increase.

You can add Breadcrumbs to your site using a simple plugin - Yummi Bread Crumbs. You can install this plugin on your site directly from the WordPress admin panel. Go to the page: Plugins - Add New , enter the name of the plugin in the search form, press Enter, install and activate the plugin.

After installing and activating the plugin, go to the page: Settings - Yummi Bread Crumbs. Here you can configure the plugin. The plugin has a very simple settings, which even the most avid teapot can handle.

– Installation type, select the type of installation. Select the Auto type to have the breadcrumbs automatically appear on your site. If you select the type - Manual, then you will have to insert the breadcrumb code into the site manually.

Kind of Bread Crumbs, choose the type of breadcrumbs. Feel free to experiment with the look of the breadcrumbs.

– Current page name, select whether to show the name of the current page or post in the HK.

On the home page, show or not HC on the main page.

pop-up hints, enable or disable tooltips.

"title=" for links, include the title attribute for links.

– Current font, the current font for HK is specified.

Change the appearance of Header Categories, You can change the font style for categories.

Your gratitude select – Hide to hide the plugin author site link from being displayed on your site.

Click on the buttonSave Changes.

Hello, dear readers of the blog site. Today I want to talk about a WordPress plugin that is used on my blog for two very important purposes at once.

Firstly, it facilitates navigation, and secondly, it solves a very important problem - creating the correct internal linking. In order not to delay the intrigue, I will immediately say that we will talk about the Breadcrumb NavXT plugin. But first things first.

I have already talked a lot about the need to create proper linking of the pages of the site so that the static weight transmitted by any external links is evenly distributed across all web pages of the project. This is especially important.

Why you need breadcrumbs in WordPress

LF promotion has a number of advantages, the main of which (especially important for non-commercial projects) is that it does not require the investment of funds necessary for the purchase external links. This is due to the fact that LF can be promoted only through the internal site alone and by creating the correct linking, as described.

By the way, for commercial projects, promotion by low frequencies also has a number of advantages, the main of which is again lower cost, but besides this, visitors who come from the issuance of such requests will be much more likely to be converted into banknotes than visitors who come by medium requests. and high-frequency (due to the vagueness of the latter).

The main idea of ​​proper linking is to ensure that the static weight transferred to different pages site (most of the external links usually lead to the main page), flowed without problems to those that are directly promoted in the LF (where, in fact, the articles are located).

But the ideal circular scheme described in the above article is difficult to implement in real conditions, therefore good option there will be a spherical linking scheme. Roughly speaking, such a scheme can be exaggerated to the point that the more internal links there are, the better the static weight will be distributed. It is like an extensive circulatory system that allows blood to carry oxygen to all, even the most distant from the lungs, internal organs.

You can manually add links to other materials on your site each time you write articles that will be relevant. True, take the internal anchor list created in this way for each of the articles very seriously. You need to do this in much the same way as. You should not use the same undiluted key in all references to it, you know what I mean.

This is very good way, but it will always be useful to expand and supplement it using automatic methods. One of the most common options for organizing something like this is the so-called breadcrumbs that expand the possibilities of navigating the resource, as well as creating a block of links to other similar materials in your project similar in subject matter to this article.

Today I want to consider the first option in detail, but about similar materials for WordPress in .

To implement breadcrumbs, we will use the Breadcrumb NavXT plugin. In principle, you can use other WordPress plugins, but I liked these more. It is possible even.

Installing the Breadcrumb NavXT Plugin in WordPress

Okay, it's time to proceed directly to installing and configuring the plugin. If you suddenly do not know what bread crumbs are, then it's okay. Actually, I didn’t know at first either, because this term was taken from the bourgeoisie and is associated with their bourgeois fairy tale about Hansel and Greta, who used them to mark the path.

In our understanding, this site navigation element should be called "Ariadne's thread", because we are somehow closer. Well, oh well, as they called it, so they called it. So, they are usually displayed somewhere at the top of the site window and actually represent the path to the article that you are in this moment read.

For example, I really like navigation with the help of crumbs and I always try to find their line on any site in order to understand where I actually am and how to go to the section where this wonderful article is located in order to read more on the same topic.

Well, remember what bread crumbs are? I think that they remembered, and if not, then look at the very top of this window under the header of this blog.

First you will need to download Breadcrumb NavXT from here. Plugin installation on WordPress is standard. Connect to your blog via FTP (working with the FileZilla client is described in detail) and open the folder on the server:

/wp-content/plugins

Unpack the archive with Breadcrumb NavXT and copy the resulting folder to the hosting server in the directory (/wp-content/plugins). Now you will need to go to the WordPress admin panel, select the "Plugins" item from the left menu, and in the window that opens, go to the "Inactive" tab. Find the line with the one you need and click on the “Activate” label located just below.

Invoking Breadcrumb NavXT and Customizing the Breadcrumb Appearance

That, in fact, is all. Now there is one more essential detail left: choose a place in the WordPress template (theme) where the line with breadcrumbs will be displayed, and paste the Breadcrumb NavXT plugin function code into this place. The task is not entirely trivial for a novice webmaster who is not very familiar with the structure of the engine and how its themes work.

But, perhaps, this will not confuse you, because. you can always read, fortunately, there is nothing difficult there.

If you are already familiar with the themes and know the purpose of certain templates in it, then we will continue. But, otherwise, I still advise you to at least superficially familiarize yourself with this, using the material indicated above (or some other).

So, our task is to determine those files from the folder with the theme you are using, in which we will need to insert the crumb call code. And then you will need to decide where exactly in the code we will insert this:

First, you need to connect to your blog via FTP and open the theme folder you are currently using:

wp-content/themes/title WordPress themes

And now let's tell you how I made the conclusion of the breadcrumbs myself, and you can repeat everything after me, or use your insertion option.

If you try to visualize the purpose of the templates from the theme, you will get something like this layout:

From this layout, we can conclude that we will need to insert the Breadcrumb NavXT call code into those templates that are responsible for displaying content in the central part of the blog: INDEX, SINGLE, ARCHIVE, PAGE or SEARCH.

True, I did not begin to display crumbs in the INDEX, which is responsible for the formation of the main page of WordPress, because there additional navigation would be redundant.

I inserted it into: SINGLE (responsible for the formation of pages with articles), ARCHIVE (generates pages for categories, temporary archives, tag archives), PAGE (forms into static pages, for example, "About the blog").

I inserted the Breadcrumb NavXT call code into these templates in the same place - at the very beginning, right after the first line:

to make it look like this:

In the cascading style sheet file STYLE.CSS from the theme folder I added a few CSS properties for BREADCRUMB class:

Breadcrumb ( font:bolder 12px "Trebuchet MS", Verdana, Arial; padding-bottom: 10px; ) .breadcrumb a( color: #1B7499; ) .breadcrumb a:hover ( color: #EF0E0E; )

These properties define the appearance of breadcrumbs in WordPress: , and . They also determine the color of links from breadcrumbs (.breadcrumb a) and the color of links when hovering over them with the mouse cursor (.breadcrumb a:hover). In general, I advise you to read the page.

Features and settings of the Breadcrumb plugin

You are free to do as you please. As they say, the master is the master. But with this, we only determined the place for the output of bread crumbs and set their appearance. But this plugin still has quite a lot of settings.

To do this, go to the WordPress admin panel and select “Breadcrumb NavXT” from the left menu in the “Settings” area. In the window that opens, you will see several tabs:

On the "General" tab, you can set parameters that will be applied to all pages of your blog. In the "Delimiter" field, specify a character that will serve as a separator in breadcrumbs. In my case, this is the “>” symbol, which is set by a special code, because the symbol ">" explicitly put down will be interpreted by WordPress as a sign of an opening HTML tag.

In general, there are (mnemonics) that, for example, cannot be inserted directly. Here are some of them:

Mnemocode Symbol " " & &< < > > ¤ ¤ ¦ ¦ § § © ª ? « « ® ® ° ° ± ± µ µ ¶ ¶ · ¹ ? € €

Choose any character you like as a separator for breadcrumbs.

In the "Maximum length" field, you can set the length of the anchor (link text) in characters. I set the length limit to 60 characters, not for design reasons, but for content optimization reasons.

Search engines can be ambivalent about links with the same anchors, so I shorten them in crumbs for uniqueness. It may not be necessary, but just in case.

In the fields "Prefix" and "Suffix" you can enter the text that will precede or follow the link to the home page in breadcrumbs.

Note that this text will be placed in the TITLE attribute of the A tag and may be considered search engines as an alternative anchor. This is me to what should be used in it keywords related to the main page of your blog.

Don't forget to save your changes in Breadcrumb NavXT plugin settings using the button of the same name. Then you can go through all the tabs. For example, on the next one, you can set the settings for the link that will lead to the page where you are now:

On the next tab "Posts / Pages" you can configure the display of links to pages with articles and static pages of your blog:

For articles, I set the previous inscription "Current article" and enclosed the text in quotation marks using the mnemonic code (see the list of mnemonic codes above):

Go to the next tab "Categories". In principle, all the same settings are repeated here as in the previous ones. I did not set the border (prefix and suffix) for the links to the categories, but I set the border for the archive pages:

As a result, on the web pages of the archive, the breadcrumbs look like this:

Good luck to you! See you soon on the blog pages site

You may be interested

Creating a Related Posts List in WordPress (with Thumbnails) Using the Related Posts Plugin for Internal Linking
Creating a blog map for visitors in WordPress ( sitemap plugins Generator and WP DS Blog Map)
Comment Toolbar - add to WordPress comments opportunity to reply and quote
Simple Counters and Category and Page Icons - beautiful RSS and Twitter counters, as well as icons for categories and pages in WordPress How to remove the transparent pixel http://yarpp.org/pixels in the Yet Another Related Posts plugin and change the inscription
Code highlighting and comment formatting buttons in WordPress - SyntaxHighlighter and Comment Form
Google XML Sitemaps - Creating a Sitemap for WordPress
Calendarize it! - Event Calendar for WordPress
WP-PageNavi - pagination for a WordPress blog - installing, configuring and changing the appearance of pagination
Better Feed for WordPress - how not to send full texts of posts to RSS and protect yourself from content theft through a news feed
All in One SEO Pack and internal search engine optimization of a WordPress blog (Canonical, Description and Title meta tags)

Let's start by telling you what breadcrumbs are generally used for when designing websites.

What are "bread crumbs"?

breadcrumbs(breadcrumbs) is a site navigation element. They are also called navigation chain, duplicate navigation, navigation menu, etc. In English literature, you can also find the name: " cookie crumbs» (cookie crumb). Breadcrumbs can also sometimes be referred to as a navigation path. Actually, all these synonyms describe the same object, which we will analyze further.

Breadcrumbs visually display the path from the main (root) page of the site to the page on which the user is currently located. Why did this navigation get such a strange name? If you have read the Brothers Grimm fairy tale “Hansel and Gretel”, then you know that in it the children, having overheard their parents talking about being left in the forest, tried to stock up on small pebbles in advance, which they threw on the road in order to get out. The first time it worked, but the second time it was impossible to pick up stones, so the children threw bread crumbs on the road. However, they did not foresee the fact that these crumbs were pecked by birds. As a result, the children got lost and came across the witch's house. There is no point in retelling the entire plot of the fairy tale, you most likely read it anyway. Actually, the name of navigation also sends us to this event.

Visually, breadcrumbs are usually a small menu that is most often located at the top of the page. The items included in this menu are hyperlinks (except for the last item) and reflect the hierarchical structure of the materials on the site.

Breadcrumbs are used by search robots. With the help of this navigation, robots are able to quickly understand the architecture of your site and analyze it. Accordingly, it is impossible to ignore breadcrumbs or deliberately refuse them, since this may indirectly affect the deterioration of the site's indexing (or the robot's incomplete crawling of the resource pages).

More importantly, breadcrumbs have a positive impact on user experience. The user can always understand exactly where he is currently on the site, can quickly move to the previous level of nesting of materials (or to a specific section), i.e. a person has before his eyes the route that he has done from the main page of the site to the current page. IN Google SERP breadcrumbs are also used, and they are not introduced to simplify the work of search robots, but precisely so that the user can see the structure of the materials.

Hello friends. In today's article, I will tell you about what breadcrumbs are, what they are for and how to add them to your wordpress blog with and without the plugin. Let's start!

Breadcrumbs are a convenient way to link your blog

One of simple ways Simultaneously simplify site navigation and linking, these are Breadcrumbs. It got its name in honor of the way in which the heroes of the German fairy tale "Hansel and Gretel" tried to find their way out of the forest.

True, the crumbs did not help the children - they were pecked by birds, but in website building the function named after the unsuccessful way of saving has taken root and is used in resources for various purposes, from personal blogs to online stores.

You must have seen this breadcrumb trail on the most different internet resources. Usually it is placed above the article, and it looks something like this:

Main page> Heading > Sub heading > Current page

Moreover, all the “links”, except for the last one, are internal links.

Thanks to this chain, the reader at any time can understand at what level of the site he is and has the opportunity to go through the entire chain, and immediately go to the section of interest to him or return to home page resource.

What are the benefits of breadcrumbs for the site and blog

As mentioned above, firstly, this is a simplification of navigation. For example, a reader came to an article, read it and decided to read other articles in the section. Thanks to breadcrumbs, he doesn't have to search for a sitemap or list of categories. He will just take a step back.

You gently invite the reader to follow the links, that is, you give him one more reason to linger on your site. This, in turn, improves behavioral factors, for which search robots, first of all, distinguish blogs and sites.

The more complex the site structure, the more important it is to install breadcrumbs on it. Since visitors, especially those who first appeared on this resource, it is difficult to understand all the blocks, pages, sections and subsections. If they are not prompted, they will leave after reading only one article.

The second task of this element, closely related to the first, is the internal optimization of the site, or rather, another way to link as many articles as possible with links. Moreover, unlike manual linking, here everything happens automatically. Above each published article, the desired navigation chain immediately appears.

This feature can be added to websites and blogs different ways. Let's take a look at the two easiest options for WordPress - installation using a plugin and by making small changes to the code.

How to add breadcrumbs to a blog with a plugin

The easiest way to install breadcrumbs on your blog is to install a special plugin. For WordPress, Breadcrumb NavXT is usually used.

The way to install it is standard: go to the blog admin -> Plugins -> Add new. In the window that appears, paste the name of the plugin and click "Find plugins".

Here it is, our plugin, click "Install now", then "Activate".

and above this line, insert the following piece of code:

If you want to place the breadcrumb in another place, then you place the same code there.

After that, go to "Settings" -\u003e "Breadcrumb NavXT Settings" and in the "Link Name" column, change the name to your own and save the changes.

It remains to go to the blog and admire the result.

How to add breadcrumbs to a blog without a plugin

Since any plugins are an additional load on the blog, slowing it down, it's better to just change the code a little, especially since in this case it's easier than installing a plugin.

Go to admin -> Appearance» -> «Editor» -> functions.php. Here, anywhere (the main thing is not inside another function), we insert the following code:

Function the_breadcrumb() ( echo "You are here: "; if (!is_front_page()) ( echo "Home"; echo " » "; if (is_category() || is_single()) ( the_category(" "); if (is_single()) ( echo " » "; the_title(); ) ) elseif (is_page()) ( echo the_title(); ) ) else ( echo "Home"; ) )

and save. If you are afraid of getting confused, just insert it at the very end above the last bracket.

Now you need this code:

place where you want to see the navigation chain, for example, again above the title of the article. To do this, go to single.php, look for the line with the_title and paste this code above it and save the changes.

You can go to the site and see what happened. As you can see, You are here and Home are clearly out of place here and should be changed to something more appropriate, such as Path and Home (or the blog name).

In addition, you need to make sure that the changes look equally good on different browsers- do not overlap with other parts of the topic and, at the same time, are clearly visible.

That's it, Breadcrumbs help your readers, and you can be proud that you figured out how to install them yourself. Thank you all for your attention!

P.S. At the end of the video article on how to put breadcrumbs on your blog:



Loading...
Top