{"id":12217,"date":"2023-07-29T01:10:28","date_gmt":"2023-07-28T16:10:28","guid":{"rendered":"http:\/\/tcd-manual.net\/?p=12217"},"modified":"2023-09-28T15:40:24","modified_gmt":"2023-09-28T06:40:24","slug":"tcd%e3%83%86%e3%83%bc%e3%83%9eego-woocommerce%ef%bc%9a%e3%82%b3%e3%83%b3%e3%83%86%e3%83%b3%e3%83%84%e3%83%93%e3%83%ab%e3%83%80%e3%83%bc%e3%80%8c%e5%95%86%e5%93%81%e4%b8%80%e8%a6%a7%e3%80%8d%e3%81%ae","status":"publish","type":"post","link":"https:\/\/tcd-manual.net\/?p=12217","title":{"rendered":"TCD\u30c6\u30fc\u30deEGO.WooCommerce\uff1a\u30b3\u30f3\u30c6\u30f3\u30c4\u30d3\u30eb\u30c0\u30fc\u300c\u5546\u54c1\u4e00\u89a7\u300d\u306e\u5546\u54c1\u306e\u4e26\u3073\u9806\u3092\u300c\u30e1\u30cb\u30e5\u30fc\u306e\u9806\u5e8f\u300d\u3067\u5236\u5fa1\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<h2 class=\"styled_h2\">Q. WooCommerce\u306e\u300c\u5546\u54c1\u300d\u306e\u300c\u9ad8\u5ea6\u306a\u8a2d\u5b9a\u300d\uff1e\u300c\u30e1\u30cb\u30e5\u30fc\u306e\u9806\u5e8f\u300d\u3092\u4f7f\u3063\u3066\u5546\u54c1\u306e\u4e26\u3073\u9806\u3092\u81ea\u7531\u306b\u5236\u5fa1\u3057\u305f\u3044\u306e\u3067\u3059\u304c\u3001\u52b9\u304d\u307e\u305b\u3093\u3002<\/h2>\n<p>\u25bc\u5909\u66f4\u7b87\u6240\u30a4\u30e1\u30fc\u30b8<br \/>\n<img decoding=\"async\" class=\"frame\" src=\"https:\/\/tcd-manual.net\/wp-content\/uploads\/2023\/07\/woocomerce_product_advanced_menu_order.jpg\" alt=\"\u8a2d\u5b9a\u753b\u9762\u30a4\u30e1\u30fc\u30b8\" \/><\/p>\n<h2 class=\"styled_h2\">A. contents-builder.php\u3092\u7de8\u96c6\u3057\u3066\u4e26\u3073\u9806\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/h2>\n<p>TCD\u30c6\u30fc\u30de\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u3066\u3001\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4f5c\u6210\u3059\u308b\u300c\u30b3\u30f3\u30c6\u30f3\u30c4\u30d3\u30eb\u30c0\u30fc\u300d\u306b\u3042\u308b\u300c\u5546\u54c1\u4e00\u89a7\u300d\u3067\u306f\u3001\u6b21\u306e3\u3064\u306e\u4e26\u3073\u9806\u306e\u307f\u3092\u63d0\u4f9b\u3057\u3066\u3044\u308b\u305f\u3081\u3001WooCommerce\u306e\u300c\u30e1\u30cb\u30e5\u30fc\u306e\u9806\u5e8f\u300d\u306f\u6a5f\u80fd\u3057\u306a\u3044\u4ed5\u7d44\u307f\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u65e5\u4ed8\uff08\u65b0\u3057\u3044\u9806\uff09<\/li>\n<li>\u65e5\u4ed8\uff08\u53e4\u3044\u9806\uff09<\/li>\n<li>\u30e9\u30f3\u30c0\u30e0<\/li>\n<\/ul>\n<p>\u305d\u3053\u3067\u3001\u3053\u308c\u3089\u4ee5\u5916\u306e\u4e26\u3073\u9806\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306b\u3001contents-builder.php\u306e\u8a72\u5f53\u7b87\u6240\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3001\u65b0\u305f\u306a\u6761\u4ef6\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<br \/>\n\u3053\u306e\u3068\u304d\u300c\u30e1\u30cb\u30e5\u30fc\u306e\u9806\u5e8f\uff08Menu Order\uff09\u300d\u3067\u6307\u5b9a\u3057\u305f\u4e26\u3073\u9806\u304c\u9069\u7528\u3055\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<h3 class=\"styled_h3\">\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u4f8b<\/h3>\n<p><b>\u7de8\u96c6\u3059\u308b\u30d5\u30a1\u30a4\u30eb\uff1a<\/b>\u3000contents-builder.php<br \/>\n<b>\u7de8\u96c6\u3059\u308b\u7b87\u6240\uff1a<\/b>\u3000588\u884c\u76ee\u4ed8\u8fd1\uff5e<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nif ( 'random' === $cb_content&#x5B;'order'] ) :\r\n\t$cb_query_args&#x5B;'orderby'] = 'rand';\r\nelseif ( 'date2' === $cb_content&#x5B;'order'] ) :\r\n\t$cb_query_args&#x5B;'orderby'] = 'date';\r\n\t$cb_query_args&#x5B;'order'] = 'ASC';\r\nelse :\r\n\t$cb_query_args&#x5B;'orderby'] = 'date';\r\n\t$cb_query_args&#x5B;'order'] = 'DESC';\r\nendif;\r\n<\/pre>\n<p>\u2193\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u3001\u4e26\u3073\u66ff\u3048\u5bfe\u8c61\uff08orderby\u304cmenu_order\uff09\u3068\u4e26\u3073\u9806\uff08\u964d\u9806DESC\uff09\u3092\u5b9a\u7fa9<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\/\/ if ( 'random' === $cb_content&#x5B;'order'] ) :\r\n\/\/ \t$cb_query_args&#x5B;'orderby'] = 'rand';\r\n\/\/ elseif ( 'date2' === $cb_content&#x5B;'order'] ) :\r\n\/\/ \t$cb_query_args&#x5B;'orderby'] = 'date';\r\n\/\/ \t$cb_query_args&#x5B;'order'] = 'ASC';\r\n\/\/ else :\r\n\/\/ \t$cb_query_args&#x5B;'orderby'] = 'date';\r\n\/\/ \t$cb_query_args&#x5B;'order'] = 'DESC';\r\n\/\/ endif;\r\n$cb_query_args&#x5B;'orderby'] = 'menu_order';\r\n$cb_query_args&#x5B;'order'] = 'DESC';\r\n<\/pre>\n<p>\u3053\u308c\u3092\u5fdc\u7528\u3057\u3066\u3001\u5546\u54c1\u306e\u30ec\u30d3\u30e5\u30fc\u8a55\u4fa1\u3084\u5546\u54c1\u540d\u9806\u306a\u3069\u307b\u304b\u306e\u65b9\u6cd5\u306b\u3082\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u25bc\u30ec\u30d3\u30e5\u30fc\u8a55\u4fa1\u304c\u9ad8\u3044\u9806<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n$cb_query_args&#x5B;'orderby'] = 'rating';\r\n$cb_query_args&#x5B;'order'] = 'DESC';\r\n<\/pre>\n<p>\u25bc\u5546\u54c1\u540d\u9806<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n$cb_query_args&#x5B;'orderby'] = 'title';\r\n$cb_query_args&#x5B;'order'] = 'ASC';\r\n<\/pre>\n<h3 class=\"styled_h3\">\u53c2\u8003\u60c5\u5831<\/h3>\n<p><a class=\"e_link\" href=\"https:\/\/woocommerce.com\/document\/woocommerce-shortcodes\/\" rel=\"noopener\" target=\"_blank\">Shortcodes included with WooCommerce<\/a><\/p>\n<blockquote><p>orderby \u2013 Sorts the products displayed by the entered option. One or more options can be passed by adding both slugs with a space between them. Available options are:<br \/>\n\u30fbdate \u2013 The date the product was published.<br \/>\n\u30fbid \u2013 The post ID of the product.<br \/>\n\u30fbmenu_order \u2013 The Menu Order, if set (lower numbers display first).<br \/>\n\u30fbpopularity \u2013 The number of purchases.<br \/>\n\u30fbrand \u2013 Randomly order the products on page load (may not work with sites that use caching, as it could save a specific order).<br \/>\n\u30fbrating \u2013 The average product rating.<br \/>\n\u30fbtitle \u2013 The product title. This is the default orderby mode.<\/p><\/blockquote>\n<blockquote><p>order \u2013 States whether the product order is ascending (ASC) or descending (DESC), using the method set in orderby. Defaults to ASC.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"Q. WooCommerce\u306e\u300c\u5546\u54c1\u300d\u306e\u300c\u9ad8\u5ea6\u306a\u8a2d\u5b9a\u300d\uff1e\u300c\u30e1\u30cb\u30e5\u30fc\u306e\u9806\u5e8f\u300d\u3092\u4f7f\u3063\u3066\u5546\u54c1\u306e\u4e26\u3073\u9806\u3092\u81ea\u7531\u306b\u5236\u5fa1\u3057\u305f\u3044\u306e\u3067\u3059\u304c\u3001\u52b9\u304d\u307e\u305b\u3093\u3002 \u25bc\u5909\u66f4\u7b87\u6240\u30a4\u30e1\u30fc\u30b8 A. contents-builder.php\u3092\u7de8\u96c6\u3057\u3066\u4e26\u3073\u9806\u3092 [&hellip;]","protected":false},"author":22,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[803],"tags":[878,325,270],"class_list":["post-12217","post","type-post","status-publish","format-standard","hentry","category-tcd079","tag-woocommerce","tag-325","tag-270"],"_links":{"self":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts\/12217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12217"}],"version-history":[{"count":0,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts\/12217\/revisions"}],"wp:attachment":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}