{"id":9823,"date":"2013-05-07T16:26:08","date_gmt":"2013-05-07T16:26:08","guid":{"rendered":"http:\/\/musilda.cz\/?p=334"},"modified":"2013-05-07T16:26:08","modified_gmt":"2013-05-07T16:26:08","slug":"vytvoreni-drobeckove-navigace-ve-wordpressu-bez-pouziti-pluginu","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/vytvoreni-drobeckove-navigace-ve-wordpressu-bez-pouziti-pluginu\/","title":{"rendered":"Vytvo\u0159en\u00ed drobe\u010dkov\u00e9 navigace ve WordPressu bez pou\u017eit\u00ed pluginu"},"content":{"rendered":"<p>Drobe\u010dkov\u00e1 navigace v \u0161ablon\u011b je u\u017eite\u010dn\u00e1 v\u011bc a proto\u017ee nejsem p\u0159\u00edtele pou\u017e\u00edv\u00e1n\u00ed mnoha zbyte\u010dn\u00fdch plugin\u016f, uk\u00e1\u017eeme si jak na to bez pluginu.<!--more--><\/p>\n<p>Do functions.php vlo\u017e\u00edme n\u00e1sleduj\u00edc\u00ed k\u00f3d:<\/p>\n<pre lang=\"php\">\nfunction the_breadcrumb() {\n\t\techo '<ul id=\"crumbs\">';\n\tif (!is_home()) {\n\t\techo '<li><a href=\"';\n\t\techo get_option('home');\n\t\techo '\">';\n\t\techo 'Home';\n\t\techo \"<\/a><\/li>\";\n\t\tif (is_category() || is_single()) {\n\t\t\techo '<li>';\n\t\t\tthe_category(' <\/li><li> ');\n\t\t\tif (is_single()) {\n\t\t\t\techo \"<\/li><li>\";\n\t\t\t\tthe_title();\n\t\t\t\techo '<\/li>';\n\t\t\t}\n\t\t} elseif (is_page()) {\n\t\t\techo '<li>';\n\t\t\techo the_title();\n\t\t\techo '<\/li>';\n\t\t}\n\t}\n\telseif (is_tag()) {single_tag_title();}\n\telseif (is_day()) {echo\"<li>Archive for \"; the_time('F jS, Y'); echo'<\/li>';}\n\telseif (is_month()) {echo\"<li>Archive for \"; the_time('F, Y'); echo'<\/li>';}\n\telseif (is_year()) {echo\"<li>Archive for \"; the_time('Y'); echo'<\/li>';}\n\telseif (is_author()) {echo\"<li>Author Archive\"; echo'<\/li>';}\n\telseif (isset($_GET['paged']) &amp;&amp; !empty($_GET['paged']))\n        {echo \"<li>Blog Archives\"; echo'<\/li>';}\n\telseif (is_search()) {echo\"<li>Search Results\"; echo'<\/li>';}\n\techo '<\/ul>';\n}\n<\/pre>\n<p>V \u0161ablon\u011b pak na m\u00edst\u011b, kde chceme m\u00edt drobe\u010dkovou navigaci zavol\u00e1me funkci<\/p>\n<pre lang=\"php\">\nthe_breadcrumb();\n<\/pre>\n<p>A to je v\u0161e. V z\u00edt\u0159ej\u0161\u00edm \u010dl\u00e1nku se pod\u00edv\u00e1me na dal\u0161\u00ed \u00fapravu administrace.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Drobe\u010dkov\u00e1 navigace v \u0161ablon\u011b je u\u017eite\u010dn\u00e1 v\u011bc a proto\u017ee nejsem p\u0159\u00edtele pou\u017e\u00edv\u00e1n\u00ed mnoha zbyte\u010dn\u00fdch plugin\u016f, uk\u00e1\u017eeme si jak na to bez pluginu.<\/p>\n","protected":false},"author":1,"featured_media":8624,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","footnotes":""},"categories":[12,19],"tags":[92,125],"class_list":["post-9823","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-navody","category-snippety","tag-breadcrumbs-wordpress","tag-drobeckova-navigace-wordpress"],"acf":[],"uagb_featured_image_src":{"full":["https:\/\/affinite.io\/cs\/wp-content\/uploads\/sites\/2\/2013\/07\/wordpress-tutorial-musilda.png",1200,800,false],"thumbnail":["https:\/\/affinite.io\/cs\/wp-content\/uploads\/sites\/2\/2013\/07\/wordpress-tutorial-musilda-150x150.png",150,150,true],"medium":["https:\/\/affinite.io\/cs\/wp-content\/uploads\/sites\/2\/2013\/07\/wordpress-tutorial-musilda-300x200.png",300,200,true],"medium_large":["https:\/\/affinite.io\/cs\/wp-content\/uploads\/sites\/2\/2013\/07\/wordpress-tutorial-musilda-768x512.png",640,427,true],"large":["https:\/\/affinite.io\/cs\/wp-content\/uploads\/sites\/2\/2013\/07\/wordpress-tutorial-musilda-1024x683.png",640,427,true],"1536x1536":["https:\/\/affinite.io\/cs\/wp-content\/uploads\/sites\/2\/2013\/07\/wordpress-tutorial-musilda.png",1200,800,false],"2048x2048":["https:\/\/affinite.io\/cs\/wp-content\/uploads\/sites\/2\/2013\/07\/wordpress-tutorial-musilda.png",1200,800,false],"archive-list":["https:\/\/affinite.io\/cs\/wp-content\/uploads\/sites\/2\/2013\/07\/wordpress-tutorial-musilda-400x265.png",400,265,true]},"uagb_author_info":{"display_name":"Affinite","author_link":"https:\/\/affinite.io\/cs\/author\/affinite\/"},"uagb_comment_info":6,"uagb_excerpt":"Drobe\u010dkov\u00e1 navigace v \u0161ablon\u011b je u\u017eite\u010dn\u00e1 v\u011bc a proto\u017ee nejsem p\u0159\u00edtele pou\u017e\u00edv\u00e1n\u00ed mnoha zbyte\u010dn\u00fdch plugin\u016f, uk\u00e1\u017eeme si jak na to bez pluginu.","_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/9823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/comments?post=9823"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/9823\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/8624"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=9823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=9823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=9823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}