{"id":1291,"date":"2014-01-29T15:15:39","date_gmt":"2014-01-29T06:15:39","guid":{"rendered":"http:\/\/www.santoshkori.com\/blog\/?p=1291"},"modified":"2014-01-29T15:15:39","modified_gmt":"2014-01-29T06:15:39","slug":"how-to-create-wordpresss-breadcrumb-without-plugin","status":"publish","type":"post","link":"https:\/\/www.santoshkori.com\/blog\/how-to-create-wordpresss-breadcrumb-without-plugin\/","title":{"rendered":"How to Create wordpresss breadcrumb without plugin"},"content":{"rendered":"<p>Here is code to show how you can create wordpress breadcrumb feature without installing any plugin.<\/p>\n<p>Open your <em>functions.php<\/em> and paste the code below in it:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nfunction the_breadcrumb() {\r\n                echo '&lt;ul id=&quot;crumbs&quot;&gt;';\r\n        if (!is_home()) {\r\n                echo '&lt;li&gt;&lt;a href=&quot;';\r\n                echo get_option('home');\r\n                echo '&quot;&gt;';\r\n                echo 'Home';\r\n                echo &quot;&lt;\/a&gt;&lt;\/li&gt;&quot;;\r\n                if (is_category() || is_single()) {\r\n                        echo '&lt;li&gt;';\r\n                        the_category(' &lt;\/li&gt;&lt;li&gt; ');\r\n                        if (is_single()) {\r\n                                echo &quot;&lt;\/li&gt;&lt;li&gt;&quot;;\r\n                                the_title();\r\n                                echo '&lt;\/li&gt;';\r\n                        }\r\n                } elseif (is_page()) {\r\n                        echo '&lt;li&gt;';\r\n                        echo the_title();\r\n                        echo '&lt;\/li&gt;';\r\n                }\r\n        }\r\n        elseif (is_tag()) {single_tag_title();}\r\n        elseif (is_day()) {echo&quot;&lt;li&gt;Archive for &quot;; the_time('F jS, Y'); echo'&lt;\/li&gt;';}\r\n        elseif (is_month()) {echo&quot;&lt;li&gt;Archive for &quot;; the_time('F, Y'); echo'&lt;\/li&gt;';}\r\n        elseif (is_year()) {echo&quot;&lt;li&gt;Archive for &quot;; the_time('Y'); echo'&lt;\/li&gt;';}\r\n        elseif (is_author()) {echo&quot;&lt;li&gt;Author Archive&quot;; echo'&lt;\/li&gt;';}\r\n        elseif (isset($_GET&#x5B;'paged']) &amp;&amp; !empty($_GET&#x5B;'paged'])) {echo &quot;&lt;li&gt;Blog Archives&quot;; echo'&lt;\/li&gt;';}\r\n        elseif (is_search()) {echo&quot;&lt;li&gt;Search Results&quot;; echo'&lt;\/li&gt;';}\r\n        echo '&lt;\/ul&gt;';\r\n}\r\n<\/pre>\n<p>Once done, open header.php and call the function:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;?php the_breadcrumb(); ?&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here is code to show how you can create wordpress breadcrumb feature without installing any plugin. Open your functions.php and paste the code below in it: function the_breadcrumb() { echo &#8216;&lt;ul id=&quot;crumbs&quot;&gt;&#8217;; if (!is_home()) { echo &#8216;&lt;li&gt;&lt;a href=&quot;&#8217;; echo get_option(&#8216;home&#8217;); echo &#8216;&quot;&gt;&#8217;; echo &#8216;Home&#8217;; echo &quot;&lt;\/a&gt;&lt;\/li&gt;&quot;; if (is_category() || is_single()) { echo &#8216;&lt;li&gt;&#8217;; the_category(&#8216; &lt;\/li&gt;&lt;li&gt; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1291","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/posts\/1291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/comments?post=1291"}],"version-history":[{"count":1,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/posts\/1291\/revisions"}],"predecessor-version":[{"id":1292,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/posts\/1291\/revisions\/1292"}],"wp:attachment":[{"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/media?parent=1291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/categories?post=1291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/tags?post=1291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}