{"id":492,"date":"2017-12-21T09:07:06","date_gmt":"2017-12-21T09:07:06","guid":{"rendered":"https:\/\/demos.welaunch.io\/woocommerce-better-compare\/?post_type=faq&#038;p=492"},"modified":"2019-10-23T12:54:34","modified_gmt":"2019-10-23T12:54:34","slug":"shortcode-for-pages","status":"publish","type":"faq","link":"https:\/\/demos.welaunch.io\/woocommerce-better-compare\/faq\/shortcode-for-pages\/","title":{"rendered":"WooCommerce Compare Shortcode"},"content":{"rendered":"<p><strong>Compare Table Shortcode<\/strong><\/p>\n<p>With the following shortcode you can create a comparison table of selected product ids:<\/p>\n<pre>[woocommerce_better_compare products=\"PRODUCT_ID_1,PRODUCT_ID_2,PRODUCT_ID_3\"]<\/pre>\n<p>If you leave the product ids empty our plugin will output the products, that a user has in his compare list automatically:<\/p>\n<pre>[woocommerce_better_compare]<\/pre>\n<p><strong>Autocomplete form Shortcode<\/strong><\/p>\n<p>To show the autocomplete form, where users can add products by search, to the compare list:<\/p>\n<pre>[woocommerce_better_compare_autocomplete]<\/pre>\n<p><strong>Compare Button Shortcode<\/strong><\/p>\n<p>To show the compare button with a shortcode you can use the one below. You can leave out a product ID to use this shortcode dynamically:<\/p>\n<pre>[woocommerce_better_compare_button product=\"PRODUCT_ID_1\"]<\/pre>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","product_cat":[],"class_list":["post-492","faq","type-faq","status-publish","hentry","faq_topics-shortcodes"],"_links":{"self":[{"href":"https:\/\/demos.welaunch.io\/woocommerce-better-compare\/wp-json\/wp\/v2\/faq\/492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demos.welaunch.io\/woocommerce-better-compare\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/demos.welaunch.io\/woocommerce-better-compare\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/demos.welaunch.io\/woocommerce-better-compare\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demos.welaunch.io\/woocommerce-better-compare\/wp-json\/wp\/v2\/comments?post=492"}],"version-history":[{"count":5,"href":"https:\/\/demos.welaunch.io\/woocommerce-better-compare\/wp-json\/wp\/v2\/faq\/492\/revisions"}],"predecessor-version":[{"id":680,"href":"https:\/\/demos.welaunch.io\/woocommerce-better-compare\/wp-json\/wp\/v2\/faq\/492\/revisions\/680"}],"wp:attachment":[{"href":"https:\/\/demos.welaunch.io\/woocommerce-better-compare\/wp-json\/wp\/v2\/media?parent=492"}],"wp:term":[{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/demos.welaunch.io\/woocommerce-better-compare\/wp-json\/wp\/v2\/product_cat?post=492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}