{"id":5186,"date":"2019-05-24T03:58:13","date_gmt":"2019-05-24T03:58:13","guid":{"rendered":"https:\/\/musilda.cz\/?p=5186"},"modified":"2019-05-24T03:58:13","modified_gmt":"2019-05-24T03:58:13","slug":"serazeni-vypisu-kategorii-podle-umisteni-v-administraci-menu_order","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/serazeni-vypisu-kategorii-podle-umisteni-v-administraci-menu_order\/","title":{"rendered":"Se\u0159azen\u00ed v\u00fdpisu kategori\u00ed podle um\u00edst\u011bn\u00ed v administraci – menu_order"},"content":{"rendered":"

Zase jedna rychlovka. D\u011blal jsem si vlastn\u00ed widget pro zobrazen\u00ed stromu kategori\u00ed pro WooCommerce, proto\u017ee ten v\u00fdchoz\u00ed nem\u00e1 sbalen\u00ed a rozbalen\u00ed nejvy\u0161\u0161\u00ed kategorie a z\u00e1kazn\u00edk trval na tom, \u017ee kategorie V\u00fdprodej mus\u00ed b\u00fdt a\u017e na konci.<\/p>\n

Mo\u017enost byla, ud\u011blat to jako menu, ale na druhou stranu, jsem cht\u011bl u\u0161et\u0159it nastavov\u00e1n\u00ed menu, p\u0159i p\u0159id\u00e1n\u00ed nov\u00e9 podkategorie.<\/p>\n

V administraci kategori\u00ed je mo\u017en\u00e9 si se\u0159adit pomoc\u00ed my\u0161i kategorie, jak pot\u0159ebujete. Probl\u00e9m je, \u017ee get_terms nepodporuje order_by => menu_order.<\/p>\n

\u0158e\u0161en\u00ed je na\u0161t\u011bst\u00ed jednoduch\u00e9. Se\u0159adit je podle term meta. WordPress si toti\u017e do term meta ukl\u00e1d\u00e1 pozici ka\u017ed\u00e9ho termu v adminu.<\/p>\n","protected":false},"excerpt":{"rendered":"

Zase jedna rychlovka. D\u011blal jsem si vlastn\u00ed widget pro zobrazen\u00ed stromu kategori\u00ed pro WooCommerce, proto\u017ee ten v\u00fdchoz\u00ed nem\u00e1 sbalen\u00ed a rozbalen\u00ed nejvy\u0161\u0161\u00ed kategorie a z\u00e1kazn\u00edk trval na tom, \u017ee kategorie V\u00fdprodej mus\u00ed b\u00fdt a\u017e na konci. Mo\u017enost byla, ud\u011blat to jako menu, ale na druhou stranu, jsem cht\u011bl u\u0161et\u0159it nastavov\u00e1n\u00ed menu, p\u0159i p\u0159id\u00e1n\u00ed nov\u00e9 podkategorie.<\/p>\n","protected":false},"author":1,"featured_media":2635,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[238],"class_list":["post-5186","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippety","tag-menu_order"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/5186"}],"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=5186"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/5186\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/2635"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=5186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=5186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=5186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}