{"id":4089,"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":"2022-05-20T10:11:54","modified_gmt":"2022-05-20T08:11:54","slug":"compare-products-shortcodes","status":"publish","type":"faq","link":"https:\/\/www.welaunch.io\/en\/knowledge-base\/faq\/compare-products-shortcodes\/","title":{"rendered":"Compare Products Shortcodes"},"content":{"rendered":"<h2>Compare Table Shortcode<\/h2>\n<p>With the following shortcode you can create a comparison table of selected product ids:<\/p>\n<pre>[woocommerce_better_compare products=\"ID1,ID2,ID3\" slidestoshow=\"\" only_first=\"no\"]<\/pre>\n<p>Set only_first to &#8220;yes&#8221; if you only want to show the first compared product (interesting when you use show all columns + autocomplete). 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<h2>Autocomplete form Shortcode<\/h2>\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<h2>Compare Button Shortcode<\/h2>\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\"]<\/pre>\n<h2>Single Product Compare<\/h2>\n<p>Shows similar products to compare on the product page.<\/p>\n<pre>[woocommerce_better_compare_single_product_page]<\/pre>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","product_cat":[],"class_list":["post-4089","faq","type-faq","status-publish","hentry","faq_topics-compare-products-shortcodes"],"_links":{"self":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/4089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/comments?post=4089"}],"version-history":[{"count":7,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/4089\/revisions"}],"predecessor-version":[{"id":11699,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/4089\/revisions\/11699"}],"wp:attachment":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/media?parent=4089"}],"wp:term":[{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/product_cat?post=4089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}