{"id":3394,"date":"2016-11-10T15:46:19","date_gmt":"2016-11-10T15:46:19","guid":{"rendered":"http:\/\/musilda.cz\/?p=3394"},"modified":"2016-11-10T15:46:19","modified_gmt":"2016-11-10T15:46:19","slug":"vypis-produktu-aktualizaci-woocommerce-zobrazuje-nespravny-pocet-produktu-radek","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/vypis-produktu-aktualizaci-woocommerce-zobrazuje-nespravny-pocet-produktu-radek\/","title":{"rendered":"V\u00fdpis produkt\u016f po aktualizaci WooCommerce zobrazuje nespr\u00e1vn\u00fd po\u010det produkt\u016f na \u0159\u00e1dek"},"content":{"rendered":"\n

Po aktualizaci WooCommerce, ale i nap\u0159\u00edklad po aktualizaci \u0161ablony, m\u016f\u017ee doj\u00edt k tomu, \u017ee se na jednom \u0159\u00e1dku, za\u010dnou zobrazovat m\u00edsto t\u0159\u00ed (\u010dty\u0159), dva produkty.<\/p>\n\n\n\n

D\u016fvod je jednoduch\u00fd. \u0160ablona obsahuje zastaral\u00fd soubor content-product.php. WooCommerce toti\u017e p\u0159id\u00e1v\u00e1 k jednotliv\u00fdm polo\u017ek\u00e1m t\u0159\u00eddy first a last, jen\u017e maj\u00ed ozna\u010dovat prvn\u00ed a posledn\u00ed produkt na \u0159\u00e1dku.<\/p>\n\n\n\n

U star\u0161\u00edch soubor\u016f, byl v\u00fdpo\u010det aktu\u00e1ln\u00ed polohy produktu \u0159e\u0161en trochu jinak, ne\u017e v nov\u00fdch verz\u00edch. Tak\u00e9 mohlo doj\u00edt, \u017ee developer va\u0161\u00ed \u0161ablony, nepou\u017eil spr\u00e1vn\u00fd postup.<\/p>\n\n\n\n

V ka\u017ed\u00e9m p\u0159\u00edpad\u011b sta\u010d\u00ed bu\u010f ze \u0161ablony soubor smazat, nebo jej upravit.<\/p>\n\n\n\n

Pokud jej otev\u0159ete, najdete na \u0159\u00e1dc\u00edch  24 a\u017e 27 k\u00f3d:<\/p>\n\n\n\n

\/\/ Store loop count we're currently on\nif ( empty( $woocommerce_loop['loop'] ) ) {\n\t$woocommerce_loop['loop'] = 0;\n}<\/pre>\n\n\n\n

a na \u0159\u00e1dc\u00edch 39 a\u017e 49 k\u00f3d:<\/p>\n\n\n\n

\/\/ Increase loop count\n$woocommerce_loop['loop']++;\n\/\/ Extra post classes\n$classes = array();\nif ( 0 === ( $woocommerce_loop['loop'] - 1 ) % $woocommerce_loop['columns'] || 1 === $woocommerce_loop['columns'] ) {\n\t$classes[] = 'first';\n}\nif ( 0 === $woocommerce_loop['loop'] % $woocommerce_loop['columns'] ) {\n\t$classes[] = 'last';\n}<\/pre>\n\n\n\n

Ob\u011b \u010d\u00e1sti odstra\u0148te.<\/p>\n\n\n\n

 
Pak u\u017e by m\u011bl v\u00fdpis fungovat bez probl\u00e9mu.<\/p>\n","protected":false},"excerpt":{"rendered":"

Po aktualizaci WooCommerce, ale i nap\u0159\u00edklad po aktualizaci \u0161ablony, m\u016f\u017ee doj\u00edt k tomu, \u017ee se na jednom \u0159\u00e1dku, za\u010dnou zobrazovat m\u00edsto t\u0159\u00ed (\u010dty\u0159), dva produkty. D\u016fvod je jednoduch\u00fd. \u0160ablona obsahuje zastaral\u00fd soubor content-product.php. WooCommerce toti\u017e p\u0159id\u00e1v\u00e1 k jednotliv\u00fdm polo\u017ek\u00e1m t\u0159\u00eddy first a last, jen\u017e maj\u00ed ozna\u010dovat prvn\u00ed a posledn\u00ed produkt na \u0159\u00e1dku. U star\u0161\u00edch soubor\u016f,<\/p>\n","protected":false},"author":1,"featured_media":8732,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,28],"tags":[288],"class_list":["post-3394","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-woocommerce","category-woocommerce-reseni-problemu","tag-pocet-produktu-na-radek"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/3394"}],"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=3394"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/3394\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/8732"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=3394"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=3394"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=3394"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}