{"id":2597,"date":"2015-11-22T08:38:06","date_gmt":"2015-11-22T08:38:06","guid":{"rendered":"http:\/\/musilda.cz\/?p=2597"},"modified":"2015-11-22T08:38:06","modified_gmt":"2015-11-22T08:38:06","slug":"child-theme-snadno-a-rychle","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/child-theme-snadno-a-rychle\/","title":{"rendered":"Child theme snadno a rychle"},"content":{"rendered":"

O child theme jsem ji\u017e psal d\u0159\u00edve a proto\u017ee opakuj\u00edc\u00ed \u010dinnosti jsou \u00fanavn\u00e9, p\u0159ipravil jsem vzorovou child theme, se v\u0161\u00edm pot\u0159ebn\u00fdm.<\/p>\n

„\u0160ablona“ osahuje jen soubor functions.php, kde se na\u010d\u00edtaj\u00ed styly z rodi\u010dovsk\u00e9 a child\u0161ablony, d\u00e1le styl.css, kde je definovan\u00e1 hlavi\u010dka \u0161ablony, soubor readme.txt, screenshot.png a soubor s licenc\u00ed.<\/p>\n

\u0160ablonu si m\u016f\u017eete st\u00e1hnout z GitHubu<\/a>\u00a0a po sta\u017een\u00ed v n\u00ed sta\u010d\u00ed ud\u011blat jenom dv\u011b zm\u011bny.<\/p>\n

V souboru style.css je pot\u0159eba nahradit \u0159\u00e1dek:<\/p>\n

* Template: replace-by-parent-theme-directory-name (twentyfifteen for example)<\/strong><\/p>\n

odpov\u00eddaj\u00edc\u00ed hodnotou. Pokud budete m\u00edt t\u0159eba \u0161ablonu Twenty Fifteen jako rodi\u010dovskou, bude \u0159\u00e1dek vypadat takto:<\/p>\n

* Template: twentyfifteen<\/strong><\/p>\n

Druhou zm\u011bnou je v souboru functions.php. nahrazen\u00ed:<\/p>\n

$parent_style<\/span> =<\/span> ‚<\/span>parent-style‚<\/span><\/span>;<\/strong><\/p>\n

To nen\u00ed \u00fapln\u011b nezbytn\u00e9, ale sp\u00ed\u0161e vhodn\u00e9. M\u00edsto parent-style vlo\u017ete n\u00e1zev slo\u017eky va\u0161\u00ed \u0161ablony.<\/p>\n

A to je v\u0161e. Ostatn\u00ed \u00fapravy z\u00e1vis\u00ed na v\u00e1s.<\/p>\n","protected":false},"excerpt":{"rendered":"

O child theme jsem ji\u017e psal d\u0159\u00edve a proto\u017ee opakuj\u00edc\u00ed \u010dinnosti jsou \u00fanavn\u00e9, p\u0159ipravil jsem vzorovou child theme, se v\u0161\u00edm pot\u0159ebn\u00fdm.<\/p>\n","protected":false},"author":1,"featured_media":2598,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[30,32],"tags":[],"class_list":["post-2597","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","category-wordpress-sablony"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/2597"}],"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=2597"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/2597\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/2598"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=2597"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=2597"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=2597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}