{"id":2102,"date":"2014-10-26T06:19:50","date_gmt":"2014-10-26T06:19:50","guid":{"rendered":"http:\/\/musilda.cz\/?p=2102"},"modified":"2014-10-26T06:19:50","modified_gmt":"2014-10-26T06:19:50","slug":"jak-odstranit-seo-description-z-vypisu-clanku-v-administraci","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/jak-odstranit-seo-description-z-vypisu-clanku-v-administraci\/","title":{"rendered":"Jak odstranit seo description z v\u00fdpisu \u010dl\u00e1nk\u016f v administraci"},"content":{"rendered":"\n

Kdo by dnes nepou\u017e\u00edval n\u011bkter\u00fd ze SEO WordPress plugin\u016f, a\u0165 je to All in SEO Pack, nebo WordPress SEO by Yoast. Tyto pluginy do v\u00fdpisu \u010dl\u00e1nk\u016f v administraci p\u0159id\u00e1vaj\u00ed zobrazen\u00ed informac\u00ed. A dnes si uk\u00e1\u017eeme, jak je odstranit.<\/p>\n\n\n\n

Kdy\u017e se pod\u00edv\u00e1te do v\u00fdpisu \u010dl\u00e1nk\u016f v administraci, tabulka, kter\u00e1 tam je, obsahuje \u0159adu informac\u00ed.<\/p>\n\n\n\n

P\u0159i pou\u017eit\u00ed n\u011bkter\u00e9ho ze SEO plugin\u016f, se do tabulky vlo\u017e\u00ed nav\u00edc Seo titulek, Seo popis a Seo kl\u00ed\u010dov\u00e1 slova. A pak ten v\u00fdpis vypad\u00e1 takto<\/p>\n\n\n

\n
\"\"<\/figure><\/div>\n\n\n

Nev\u00edm, jak v\u00e1m, ale m\u011b to hrozn\u011b vad\u00ed. M\u00e1m rad\u011bji men\u0161\u00ed \u0159\u00e1dky, proto\u017ee se mohu l\u00e9pe orientovat, kdy\u017e n\u011bco hled\u00e1m.<\/p>\n\n\n\n

Tak\u017ee pomoc\u00ed jednoduch\u00e9 funkce, odstran\u00edme p\u0159ebyte\u010dn\u00e9 informace. Keywords u\u017e stejn\u011b nikdo nevypl\u0148uje a to, zda je vypln\u011bn\u00e9 title a description, je odpov\u011bdnost\u00ed redaktora. K odstran\u011bn\u00ed vyu\u017eijeme filter manage_edit-(post type). Tento filter je trochu odli\u0161n\u00fd od ostatn\u00edch, proto\u017ee m\u016f\u017ee b\u00fdt pou\u017eit\u00fd ve v\u00edce variant\u00e1ch, dle typu obsahu. Nap\u0159\u00edklad manage_edit-page_columns ovlivn\u00ed pouze v\u00fdpis str\u00e1nek.<\/p>\n\n\n\n

My budeme ovliv\u0148ovat v\u00fdpis \u010dl\u00e1nk\u016f, tak\u017ee pou\u017eijeme manage_edit-post_columns<\/p>\n\n\n\n

V k\u00f3du str\u00e1nky si najdeme tento k\u00f3d<\/p>\n\n\n\n

Datum<\/a>ViewsSEO TitleSEO Description\n<\/pre>\n\n\n\n

Co\u017e je hlavi\u010dka tabulky, a u v\u0161ech sloupc\u016f, kter\u00e9 chceme odstranit, si poznamen\u00e1me jejich id. Zde to je nap\u0159\u00edklad seotitle s seodesc.
N\u00e1sledn\u011b do functions.php vlo\u017e\u00edme tuto funkci<\/p>\n\n\n\n

function musilda_remove_columns( $columns ) {\n\n\tunset( $columns['tags'] );\n\tunset( $columns['seotitle'] );\n\tunset( $columns['seodesc'] );\n\tunset( $columns['seokeywords'] );\n\n\treturn $columns;\n\n}\nadd_filter ( 'manage_edit-post_columns', 'musilda_remove_columns', 99, 1 );\n<\/pre>\n\n\n\n

Ka\u017ed\u00fd \u0159\u00e1dek unset, znamen\u00e1 id jednoho sloupce. Pokud chcete ve v\u00fdpise zachovat tagy, tak ten \u0159\u00e1dek sma\u017ete. Pokud pou\u017e\u00edv\u00e1te jin\u00fd plugin, tak mus\u00edte hodnoty seo… atd. zm\u011bnit dle va\u0161eho aktu\u00e1ln\u00edho k\u00f3du.<\/p>\n\n\n

\n
\"\"<\/a><\/figure><\/div>\n\n\n

V\u00fdsledek
<\/p>\n\n\n\n

Osobn\u011b bych v\u00fdpis je\u0161t\u011b malinko upravil, ale to u\u017e je z\u00e1le\u017eitost sp\u00ed\u0161e stylov\u00e1n\u00ed.<\/p>\n","protected":false},"excerpt":{"rendered":"

Kdo by dnes nepou\u017e\u00edval n\u011bkter\u00fd ze SEO WordPress plugin\u016f, a\u0165 je to All in SEO Pack, nebo WordPress SEO by Yoast. Tyto pluginy do v\u00fdpisu \u010dl\u00e1nk\u016f v administraci p\u0159id\u00e1vaj\u00ed zobrazen\u00ed informac\u00ed. A dnes si uk\u00e1\u017eeme, jak je odstranit. Kdy\u017e se pod\u00edv\u00e1te do v\u00fdpisu \u010dl\u00e1nk\u016f v administraci, tabulka, kter\u00e1 tam je, obsahuje \u0159adu informac\u00ed. P\u0159i pou\u017eit\u00ed<\/p>\n","protected":false},"author":1,"featured_media":2104,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-2102","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-navody"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/2102"}],"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=2102"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/2102\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/2104"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=2102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=2102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=2102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}