{"id":144,"date":"2013-04-14T09:26:52","date_gmt":"2013-04-14T09:26:52","guid":{"rendered":"http:\/\/musilda.cz\/?p=144"},"modified":"2013-04-14T09:26:52","modified_gmt":"2013-04-14T09:26:52","slug":"zobrazeni-oblaku-stitku-v-sablone","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/zobrazeni-oblaku-stitku-v-sablone\/","title":{"rendered":"Zobrazen\u00ed oblaku \u0161t\u00edtk\u016f v \u0161ablon\u011b"},"content":{"rendered":"
<\/p>\n
Pro zobrazen\u00ed mraku\/oblaku \u0161t\u00edtk\u016f v je mo\u017en\u00e9 pou\u017e\u00edt widget, ale pokud chceme zobrazit \u0161t\u00edtky v pati\u010dce bez pou\u017eit\u00ed widgetu, nebo na sitemap str\u00e1nce, vyu\u017eijeme funkci wp_tag_cloud(), kter\u00e1 zobraz\u00ed v\u00fdpis v\u0161ech \u0161t\u00edtk\u016f dle parametr\u016f. V \u0161ablon\u011b pak vlo\u017e\u00edme na \u0159\u00e1dek, kde chceme zobrazit \u0161t\u00edtky n\u00e1sleduj\u00edc\u00ed k\u00f3d:<\/p>\n
wp_tag_cloud();<\/pre>\nT\u00edm se n\u00e1m vyp\u00ed\u0161e mrak \u0161t\u00edtk\u016f s defaultn\u00edmi hodnotami, my si v\u0161ak budeme ur\u010dit\u011b cht\u00edt v\u00fdpis upravit, aby n\u00e1m to do \u0161ablony pasovalo. K tomuto \u00fa\u010delu slou\u017e\u00ed n\u00e1sleduj\u00edc\u00ed parametry:<\/p>\n
Jak je vid\u011bt, funkce m\u00e1 pom\u011brn\u011b dost parametr\u016f, kter\u00e9 n\u00e1m umo\u017en\u00ed zobrazit p\u0159esn\u011b takov\u00fd shluk \u0161t\u00edtku, jak\u00fd pot\u0159ebujeme. V \u0161ablon\u011b pak jednodu\u0161e vyp\u00ed\u0161eme \u0161t\u00edtky:<\/p>\n
wp_tag_cloud(array(
\n ‚smallest‘ => 10,
\n ‚largest‘ => 18,
\n ‚unit‘ => ‚px‘,
\n ‚orderby‘ => ‚name‘,
\n ‚order‘ => ‚ASC‘
\n));<\/p>\n","protected":false},"excerpt":{"rendered":"
Pro zobrazen\u00ed mraku\/oblaku \u0161t\u00edtk\u016f v je mo\u017en\u00e9 pou\u017e\u00edt widget, ale pokud chceme zobrazit \u0161t\u00edtky v pati\u010dce bez pou\u017eit\u00ed widgetu, nebo na sitemap str\u00e1nce, vyu\u017eijeme funkci wp_tag_cloud(), kter\u00e1 zobraz\u00ed v\u00fdpis v\u0161ech \u0161t\u00edtk\u016f dle parametr\u016f. V \u0161ablon\u011b pak vlo\u017e\u00edme na \u0159\u00e1dek, kde chceme zobrazit \u0161t\u00edtky n\u00e1sleduj\u00edc\u00ed k\u00f3d: wp_tag_cloud(); T\u00edm se n\u00e1m vyp\u00ed\u0161e mrak \u0161t\u00edtk\u016f s defaultn\u00edmi<\/p>\n","protected":false},"author":1,"featured_media":8624,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,19],"tags":[243,366,548],"class_list":["post-144","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-navody","category-snippety","tag-mrak-stitku-wordpress","tag-stitky","tag-wp_tag_cloud"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/144"}],"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=144"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/144\/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=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}