{"id":1341,"date":"2013-12-14T05:56:48","date_gmt":"2013-12-14T05:56:48","guid":{"rendered":"http:\/\/musilda.cz\/?p=1341"},"modified":"2013-12-14T05:56:48","modified_gmt":"2013-12-14T05:56:48","slug":"funkce-get_the_excerpt","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/funkce-get_the_excerpt\/","title":{"rendered":"Funkce get_the_excerpt"},"content":{"rendered":"
Funkce get_the_excerpt, je obdobou funkce the_excerpt, kter\u00e1 vypisuje zkr\u00e1cenou \u010d\u00e1st p\u0159\u00edsp\u011bvku. Na rozd\u00edl od the_excerpt se neprov\u00e1d\u00ed rovnou echo, ale funkce vrac\u00ed \u0159et\u011bzec, d\u00edky \u010demu\u017e se s n\u00ed d\u00e1 d\u00e1le pracovat.<\/p>\n
Nep\u0159\u00edjemnou vlastnost\u00ed t\u00e9to funkce je, \u017ee se p\u0159i jej\u00edm generov\u00e1n\u00ed z obsahu odstran\u00ed ve\u0161ker\u00e9 html form\u00e1tov\u00e1n\u00ed, proto\u017ee je nutno zajistit, aby nevznikaly neuzav\u0159en\u00e9 html tagy, nap\u0159\u00edklad v\u00fdpisem jen poloviny nadpisu. Proto rad\u011bji pou\u017e\u00edv\u00e1m the_content a tag more.<\/p>\n
Pou\u017eit\u00ed:<\/p>\n
<pre lang=“php“><\/p>\n
$obsah = get_the_excerpt();<\/p>\n
echo $obsah;<\/p>\n
<\/pre><\/p>\n
Funkce mus\u00ed b\u00fdt pou\u017eita uvnit\u0159 loopu.<\/p>\n
<\/p>\n","protected":false},"excerpt":{"rendered":"
Funkce get_the_excerpt, je obdobou funkce the_excerpt, kter\u00e1 vypisuje zkr\u00e1cenou \u010d\u00e1st p\u0159\u00edsp\u011bvku. Na rozd\u00edl od the_excerpt se neprov\u00e1d\u00ed rovnou echo, ale funkce vrac\u00ed \u0159et\u011bzec, d\u00edky \u010demu\u017e se s n\u00ed d\u00e1 d\u00e1le pracovat. Nep\u0159\u00edjemnou vlastnost\u00ed t\u00e9to funkce je, \u017ee se p\u0159i jej\u00edm generov\u00e1n\u00ed z obsahu odstran\u00ed ve\u0161ker\u00e9 html form\u00e1tov\u00e1n\u00ed, proto\u017ee je nutno zajistit, aby nevznikaly neuzav\u0159en\u00e9 html<\/p>\n","protected":false},"author":1,"featured_media":8523,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,15],"tags":[],"class_list":["post-1341","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\/1341"}],"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=1341"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/1341\/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=1341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=1341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=1341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}