{"id":574,"date":"2013-06-07T16:16:42","date_gmt":"2013-06-07T16:16:42","guid":{"rendered":"http:\/\/musilda.cz\/?p=574"},"modified":"2013-06-07T16:16:42","modified_gmt":"2013-06-07T16:16:42","slug":"jak-odstanit-stranky-z-vysledku-hledani-ve-wordpressu","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/jak-odstanit-stranky-z-vysledku-hledani-ve-wordpressu\/","title":{"rendered":"Jak odstanit str\u00e1nky z v\u00fdsledk\u016f hled\u00e1n\u00ed ve WordPressu"},"content":{"rendered":"\n
Pokud m\u00e1te web, na kter\u00e9m m\u00e1te p\u0159edev\u0161\u00edm \u010dl\u00e1nky a str\u00e1nky vyu\u017e\u00edv\u00e1te sp\u00ed\u0161e pro prezenta\u010dn\u00ed \u00fa\u010dely, m\u016f\u017ee se v\u00e1m hodit odstran\u011bn\u00ed str\u00e1nek z v\u00fdsledk\u016f hled\u00e1n\u00ed. Typick\u00fd p\u0159\u00edklad m\u016f\u017eou b\u00fdt firemn\u00ed str\u00e1nky, kter\u00e9 maj\u00ed blog jako kategorii a ne na dom\u00e9n\u011b blog.stranka.cz. <\/p>\n\n\n\n\n\n\n\n
Pom\u016f\u017ee v\u00e1m n\u00e1sleduj\u00edc\u00ed k\u00f3d, kter\u00fd vlo\u017e\u00edte do functions.php:<\/p>\n\n\n\n
function hide_page_from_search($query) {\nif ($query->is_search) {\n$query->set('post_type', 'page');\n}\nreturn $query;\n}\nadd_filter('pre_get_posts', 'hide_page_from_search');\n<\/pre>\n","protected":false},"excerpt":{"rendered":"Pokud m\u00e1te web, na kter\u00e9m m\u00e1te p\u0159edev\u0161\u00edm \u010dl\u00e1nky a str\u00e1nky vyu\u017e\u00edv\u00e1te sp\u00ed\u0161e pro prezenta\u010dn\u00ed \u00fa\u010dely, m\u016f\u017ee se v\u00e1m hodit odstran\u011bn\u00ed str\u00e1nek z v\u00fdsledk\u016f hled\u00e1n\u00ed. Typick\u00fd p\u0159\u00edklad m\u016f\u017eou b\u00fdt firemn\u00ed str\u00e1nky, kter\u00e9 maj\u00ed blog jako kategorii a ne na dom\u00e9n\u011b blog.stranka.cz.<\/p>\n","protected":false},"author":1,"featured_media":8624,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[19],"tags":[460],"class_list":["post-574","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippety","tag-wordpress-2"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/574"}],"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=574"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/574\/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=574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}