{"id":1535,"date":"2014-02-10T20:54:41","date_gmt":"2014-02-10T20:54:41","guid":{"rendered":"http:\/\/musilda.cz\/?p=1535"},"modified":"2014-02-10T20:54:41","modified_gmt":"2014-02-10T20:54:41","slug":"funkce-is_single","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/funkce-is_single\/","title":{"rendered":"Funkce is_single"},"content":{"rendered":"

Tato funkce, n\u011bkdy taky ozna\u010dovan\u00e1 jako podmi\u0148ovac\u00ed tag, zji\u0161\u0165uje, zda se zobrazuje v\u00fdpis postu. Funguje u jak\u00e9hokoliv druhu obsahu, krom\u011b str\u00e1nky a attachment(souboru). \u00a0Zjednodu\u0161en\u011b to znamen\u00e1, \u017ee pokud se pr\u00e1v\u011b d\u00edv\u00e1te na detail \u010dl\u00e1nku, funkce vrac\u00ed true.<\/p>\n

Pou\u017eit\u00ed:<\/h2>\n
is_single($post);<\/pre>\n

$post m\u016f\u017ee b\u00fdt bu\u010f id, titulek, nebo slug postu. Nen\u00ed povinn\u00fd a proto m\u016f\u017eete funkci pou\u017e\u00edt i bez n\u011bj:<\/p>\n

\nif(is_single()){\nTady zobraz\u00edm n\u011bco, co chci, aby se zobrazilo jen na detailu \u010dl\u00e1nku.\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

Tato funkce, n\u011bkdy taky ozna\u010dovan\u00e1 jako podmi\u0148ovac\u00ed tag, zji\u0161\u0165uje, zda se zobrazuje v\u00fdpis postu. Funguje u jak\u00e9hokoliv druhu obsahu, krom\u011b str\u00e1nky a attachment(souboru). \u00a0Zjednodu\u0161en\u011b to znamen\u00e1, \u017ee pokud se pr\u00e1v\u011b d\u00edv\u00e1te na detail \u010dl\u00e1nku, funkce vrac\u00ed true. Pou\u017eit\u00ed: is_single($post); $post m\u016f\u017ee b\u00fdt bu\u010f id, titulek, nebo slug postu. Nen\u00ed povinn\u00fd a proto m\u016f\u017eete funkci pou\u017e\u00edt<\/p>\n","protected":false},"author":1,"featured_media":8523,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[7,15],"tags":[],"class_list":["post-1535","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-codex","category-post-funkce"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/1535"}],"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=1535"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/1535\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/8523"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=1535"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=1535"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=1535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}