{"id":6282,"date":"2021-10-06T04:00:47","date_gmt":"2021-10-06T04:00:47","guid":{"rendered":"https:\/\/musilda.cz\/?p=6282"},"modified":"2021-10-06T04:00:47","modified_gmt":"2021-10-06T04:00:47","slug":"jak-pridat-vlastni-tab-do-detailu-produktu","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/jak-pridat-vlastni-tab-do-detailu-produktu\/","title":{"rendered":"Jak p\u0159idat vlastn\u00ed tab do detailu produktu"},"content":{"rendered":"\n

Detail produktu WooCommerce obsahuje v z\u00e1kladu takzvan\u00e9 taby, co\u017e jsou z\u00e1lo\u017eky, slou\u017e\u00edc\u00ed k zobrazen\u00ed dal\u0161\u00edho obsahu k produktu. <\/p>\n\n\n\n

V z\u00e1kladu obsahuj\u00ed popis produktu, jeho vlastnosti a pokud jsou povoleny, tak i recenze.<\/p>\n\n\n\n

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

Pom\u011brn\u011b \u010dast\u00fdm po\u017eadavkem je roz\u0161\u00ed\u0159en\u00ed tab\u016f u dal\u0161\u00ed polo\u017eky. Chcete nap\u0159\u00edklad p\u0159idat ke v\u0161em produkt\u016fm video z youtube. <\/p>\n\n\n\n

N\u00e1sleduj\u00edc\u00ed snippet p\u0159id\u00e1 do tab\u016f polo\u017eku Product video a zobraz\u00ed video z Youtube.<\/p>\n\n\n\n

add_filter( 'woocommerce_product_tabs', 'custom_product_tabs' );\nfunction custom_product_tabs( $product_tabs ) {\n\n\t$product_tabs['product-video'] = array(\n\t\t'title' => __( 'Product video', 'musilda' ),\n\t\t'callback' => 'display_video_tab_content'\n\t);\n\n\treturn $product_tabs;\n\n}\n\nfunction display_video_tab_content() {\n\n\techo '<iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/ShmJNXkoDNQ\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>';\n\n}<\/code><\/pre>\n\n\n\n

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

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

Pokud budete pot\u0159ebovat, m\u00edt mo\u017enost, vlo\u017eit k produktu unik\u00e1tn\u00ed video, mus\u00edte si p\u0159idat pol\u00ed\u010dko do nastaven\u00ed produktu. to bude ur\u010dit\u011b obsahem n\u011bkter\u00e9ho z p\u0159\u00ed\u0161t\u00edch snippet\u016f.<\/p>\n\n\n\n

Dal\u0161\u00ed u\u017eite\u010dn\u00e9 snippety najdete na str\u00e1nce U\u017eite\u010dn\u00e9 snippety pro WooCommerce<\/strong> <\/p>\n","protected":false},"excerpt":{"rendered":"

Detail produktu WooCommerce obsahuje v z\u00e1kladu takzvan\u00e9 taby, co\u017e jsou z\u00e1lo\u017eky, slou\u017e\u00edc\u00ed k zobrazen\u00ed dal\u0161\u00edho obsahu k produktu. V z\u00e1kladu obsahuj\u00ed popis produktu, jeho vlastnosti a pokud jsou povoleny, tak i recenze. Pom\u011brn\u011b \u010dast\u00fdm po\u017eadavkem je roz\u0161\u00ed\u0159en\u00ed tab\u016f u dal\u0161\u00ed polo\u017eky. Chcete nap\u0159\u00edklad p\u0159idat ke v\u0161em produkt\u016fm video z youtube. N\u00e1sleduj\u00edc\u00ed snippet p\u0159id\u00e1 do tab\u016f<\/p>\n","protected":false},"author":1,"featured_media":5600,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"class_list":["post-6282","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-woocommerce-snippety"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/6282"}],"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=6282"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/6282\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/5600"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=6282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=6282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=6282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}