{"id":2064,"date":"2014-10-11T05:59:20","date_gmt":"2014-10-11T05:59:20","guid":{"rendered":"http:\/\/musilda.cz\/?p=2064"},"modified":"2014-10-11T05:59:20","modified_gmt":"2014-10-11T05:59:20","slug":"zobrazeni-widgetu-jen-na-vybranych-strankach","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/zobrazeni-widgetu-jen-na-vybranych-strankach\/","title":{"rendered":"Zobrazen\u00ed widget\u016f jen na vybran\u00fdch str\u00e1nk\u00e1ch"},"content":{"rendered":"
V p\u0159\u00edpad\u011b, \u017ee m\u00e1te v sidebaru widget, kter\u00fd chcete zobrazit jen na ur\u010dit\u00e9 str\u00e1nce, tak si bu\u010f vytvo\u0159\u00edte speci\u00e1ln\u00ed sidebar pro ur\u010ditou str\u00e1nku a do n\u011bj budete znovu vkl\u00e1dat widgety, v\u010detn\u011b toho, kter\u00fd chcete zobrazit, nebo vyu\u017eijete filtru widget_display_callback.<\/p>\n
D\u00edky tomu tak m\u016f\u017eete m\u00edt widget, ur\u010den\u00fd v tomto p\u0159\u00edpad\u011b jen na str\u00e1nku kontaktu, nap\u0159\u00edklad kontaktn\u00ed informace a ten se tak zobraz\u00ed pr\u00e1v\u011b na t\u00e9to jedn\u00e9 str\u00e1nce.<\/p>\n
\nadd_filter( 'widget_display_callback', 'show_on_contact_page', 10, 3 );\n\nfunction show_on_contact_page( $instance, $widget, $args ) {\n\n if ( $widget->id_base == 'jmeno widgetu' ) {\n if ( !is_page( 'kontakt' ) ) {\n return false;\n }\n }\n\n}\n<\/pre>\nFunkci op\u011bt um\u00edst\u011bte do functions.php, nebo souboru, kter\u00fd do functions.php na\u010d\u00edt\u00e1te.<\/p>\n","protected":false},"excerpt":{"rendered":"
V p\u0159\u00edpad\u011b, \u017ee m\u00e1te v sidebaru widget, kter\u00fd chcete zobrazit jen na ur\u010dit\u00e9 str\u00e1nce, tak si bu\u010f vytvo\u0159\u00edte speci\u00e1ln\u00ed sidebar pro ur\u010ditou str\u00e1nku a do n\u011bj budete znovu vkl\u00e1dat widgety, v\u010detn\u011b toho, kter\u00fd chcete zobrazit, nebo vyu\u017eijete filtru widget_display_callback. D\u00edky tomu tak m\u016f\u017eete m\u00edt widget, ur\u010den\u00fd v tomto p\u0159\u00edpad\u011b jen na str\u00e1nku kontaktu, nap\u0159\u00edklad kontaktn\u00ed<\/p>\n","protected":false},"author":1,"featured_media":1484,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-2064","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippety"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/2064"}],"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=2064"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/2064\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/1484"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=2064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=2064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=2064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}