{"id":313,"date":"2020-05-12T08:27:11","date_gmt":"2020-05-12T08:27:11","guid":{"rendered":"https:\/\/directorist.com\/docs\/?page_id=313"},"modified":"2020-06-01T07:07:19","modified_gmt":"2020-06-01T07:07:19","slug":"dummy-content","status":"publish","type":"page","link":"https:\/\/directorist.com\/documentation\/dummy-content\/","title":{"rendered":"Dummy Content"},"content":{"rendered":"<p>&nbsp;<br \/>\n<code>[add_to_cart]<\/code><\/p>\n<pre class=\"wp-block-preformatted\">[directorist_all_listing redirect_page_url=\"www.aazztech.com\"]<\/pre>\n<pre class=\"wp-block-preformatted\">add_filter( 'woocommerce_shortcode_products_query', 'woocommerce_shortcode_products_orderby' );\r\n\r\nfunction woocommerce_shortcode_products_orderby( $args ) {\r\n\r\n    $standard_array = array('menu_order','title','date','rand','id');\r\n\r\n    if( isset( $args['orderby'] ) &amp;&amp; !in_array( $args['orderby'], $standard_array ) ) {\r\n        $args['meta_key'] = $args['orderby'];\r\n        $args['orderby']  = 'meta_value_num'; \r\n    }\r\n\r\n    return $args;\r\n}<\/pre>\n<div class=\"wd-note\">Note: the \u2018limit\u2019 shortcode argument will determine how many products are shown on a page. This will not add pagination to the shortcode.<\/div>\n<p>&nbsp;<br \/>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; [add_to_cart] [directorist_all_listing redirect_page_url=&#8221;www.aazztech.com&#8221;] add_filter( &#8216;woocommerce_shortcode_products_query&#8217;, &#8216;woocommerce_shortcode_products_orderby&#8217; ); function woocommerce_shortcode_products_orderby( $args ) { $standard_array = array(&#8216;menu_order&#8217;,&#8217;title&#8217;,&#8217;date&#8217;,&#8217;rand&#8217;,&#8217;id&#8217;); if( isset( $args[&#8216;orderby&#8217;] ) &amp;&amp; !in_array( $args[&#8216;orderby&#8217;], $standard_array ) ) { $args[&#8216;meta_key&#8217;] = $args[&#8216;orderby&#8217;]; $args[&#8216;orderby&#8217;] = &#8216;meta_value_num&#8217;; } return $args; } Note: the \u2018limit\u2019 shortcode argument will determine how many products are shown on a page. This will not [&hellip;]<\/p>\n","protected":false},"author":2296,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-313","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/directorist.com\/documentation\/wp-json\/wp\/v2\/pages\/313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/directorist.com\/documentation\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/directorist.com\/documentation\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/directorist.com\/documentation\/wp-json\/wp\/v2\/users\/2296"}],"replies":[{"embeddable":true,"href":"https:\/\/directorist.com\/documentation\/wp-json\/wp\/v2\/comments?post=313"}],"version-history":[{"count":0,"href":"https:\/\/directorist.com\/documentation\/wp-json\/wp\/v2\/pages\/313\/revisions"}],"wp:attachment":[{"href":"https:\/\/directorist.com\/documentation\/wp-json\/wp\/v2\/media?parent=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}