Title: ShortCode does&#8217;t work
Last modified: May 23, 2018

---

# ShortCode does’t work

 *  Resolved [makroflex](https://wordpress.org/support/users/makroflex/)
 * (@makroflex)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-doest-work/)
 * Hello.
 * I created a new page and inserted short code [product_page id=”99″], but I cannot
   see my product page, what I can see just a code as a text. Why?
 * P.s I tried different short codes, for example: cart, they are working fine.
 * Thanks
 * I added a screenshot:
 * [Photo1](https://prnt.sc/jlqgmo)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Support [John Coy a11n](https://wordpress.org/support/users/johndcoy/)
 * (@johndcoy)
 * Automattic Happiness Engineer
 * [8 years ago](https://wordpress.org/support/topic/shortcode-doest-work/#post-10315006)
 * Hi [@makroflex](https://wordpress.org/support/users/makroflex/),
 * The shortcode `[product_page id=”99″]` is to add a single specific product to
   any page using the ID of the page, in this case 99. You also can use a specific
   product SKU using `[product_page sku="FOO"]`, replacing FOO with your product’s
   SKU.
 * If you’d like to set the shop page that displays all of your products, you can
   do so under **WooCommerce > Settings > Products > Shop page**. Hope this helps.
 *  Thread Starter [makroflex](https://wordpress.org/support/users/makroflex/)
 * (@makroflex)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-doest-work/#post-10315442)
 * What I want to do is make my Home Page as one product. I can do it this way:
 * 1. Create a page and insert my product with that code `[product_page id=”99″]`
   
   2. Set that page as HomePage.
 * BUT THAT IS NOT WORKING. When I add this code `[product_page id=”99″]` to my 
   page, I can see only code…
 * I created a lot of woocomerce webpages and first time I got that problem.
 *  Plugin Support [John Coy a11n](https://wordpress.org/support/users/johndcoy/)
 * (@johndcoy)
 * Automattic Happiness Engineer
 * [8 years ago](https://wordpress.org/support/topic/shortcode-doest-work/#post-10315869)
 * Hi @markoflex,
 * Can you confirm that 99 is the correct ID you should be using? You can get the
   correct ID of the product you’d like to display by editing the product from the
   WP Admin and obtaining the ID from the URL:
 * [http://cld.wthms.co/I1vcdX](http://cld.wthms.co/I1vcdX)
 * Hope this helps.
 *  Thread Starter [makroflex](https://wordpress.org/support/users/makroflex/)
 * (@makroflex)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-doest-work/#post-10317631)
 * Of Course I checked my product ID and I changed it, also I tried to do same thing
   with SKU, but also does not work.
 * EDIT:
 * I added video if somebody not understand what I want to say:
 * Public Google Drive link: [https://drive.google.com/file/d/1VX3L34MrDkT4jRhmvRhMkxqLqb-lmm6D/view](https://drive.google.com/file/d/1VX3L34MrDkT4jRhmvRhMkxqLqb-lmm6D/view)
 * P.s I am using WPBakery Page Builder maybe it can effect it. What do you think?
    -  This reply was modified 8 years ago by [makroflex](https://wordpress.org/support/users/makroflex/).
 *  Plugin Support [John Coy a11n](https://wordpress.org/support/users/johndcoy/)
 * (@johndcoy)
 * Automattic Happiness Engineer
 * [8 years ago](https://wordpress.org/support/topic/shortcode-doest-work/#post-10319138)
 * Hi [@makroflex](https://wordpress.org/support/users/makroflex/),
 * Thanks for confirming the use of the correct ID. The page builder could be effecting
   it since you’ve added in into the Text view of the editor. Have you tried switching
   back to a default theme like Twenty Seventeen or [Storefront](https://woocommerce.com/storefront/)
   and disabling all plugins except for WooCommerce to see if this resolves the 
   issue?
 *  [HeleneL](https://wordpress.org/support/users/helenel/)
 * (@helenel)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-doest-work/#post-10319357)
 * I have a similar problem. The pages where I used [product_page id=”99″] (with
   the proper ID of course) do not display the product page anymore.
    I only noticed
   it yesterday but it happened before the latest update to 3.4.0… I think it took
   place with update 3.3.5. If I inspect the page then it appears that the whole“
   description” etc… is not loaded on the page. I tried changing the Id for SKU 
   but same result.
 * The only thing I could manage to have is the summary… but I asked through css
   not to see it displayed.
    As a result I only get related products!
 *  Thread Starter [makroflex](https://wordpress.org/support/users/makroflex/)
 * (@makroflex)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-doest-work/#post-10319405)
 * I changed my theme to default and it is working! (I did not disable any plugins)
   Now I have several ideas what I can do. I will write after my tests.
 *  Plugin Support [Riaan K.](https://wordpress.org/support/users/riaanknoetze/)
 * (@riaanknoetze)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-doest-work/#post-10321333)
 * [@makroflex](https://wordpress.org/support/users/makroflex/) – thanks for reporting
   back 🙂
 * If switching themes did the trick for, then it likely means that there’s some
   custom code (or a template override) that’s affecting that shortcode. It might
   be worthwhile getting in touch with your theme developers to take a closer look
   into that for you.
 *  Thread Starter [makroflex](https://wordpress.org/support/users/makroflex/)
 * (@makroflex)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-doest-work/#post-10322903)
 * I will. But here something is crazy. All short codes are working perfectly except`[
   product_page id="942"]`…It is so annoying for me. When WPBakery is disabled everything
   are fine, but when I turn it on again, I see only short code as text. 😐
 *  [Mikey Arce](https://wordpress.org/support/users/mikeyarce/)
 * (@mikeyarce)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-doest-work/#post-10324552)
 * > When WPBakery is disabled everything are fine, but when I turn it on again,
   > I see only short code as text. 😐
 * Hmmmm – are you making sure to enter the shortcode into an “HTML” type editing?
   I wonder if WPBakery is converting it thinking it’s just text and stripping out
   the important parts. Try going into some kind of “HTML” or “Text” editing instead
   of WPBakery and see if that helps.
 *  Thread Starter [makroflex](https://wordpress.org/support/users/makroflex/)
 * (@makroflex)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-doest-work/#post-10337966)
 * I tried everything, it’s not working. All others themes has “Add Product Page”
   in WPBakery and I can add a new product to page easily. This theme doesn’t have
   it, but it MUST work with that shortocode…
 *  [eas](https://wordpress.org/support/users/eas/)
 * (@eas)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/shortcode-doest-work/#post-10485433)
 * I was having the same issue, I think, but I’m not using any sort of page builder.
 * I ended up getting it working, but I’m not really sure why it works now, and 
   why it didn’t before.
 * Some clues though from looking for my revision history for the page.
    - First, using the HTML editing mode I entered the [products] shortcode, specifying
      the skus=”XXX” atribute. The version history shows that a span was injected
      starting after the first quote, and ending after the closing square bracket
      for the short code.`[products skus="<span style="caret-color: #555555; color:#
      555555; font-size: 13px; background-color: #f9f9f9;">S9-001"]</span>`
    - Next, I added the columns attribute. I’m not sure if it had any effect — I
      didn’t quote the numeric argument (or it was stripped — but the page still
      showed the product summary. The html shows that the added argument is within
      the existing span
    - Then I edited the shortcode in place by deleting the ‘s’ at the end and adding‘
      _page’. I didn’t change the arguments/attributes (ie I left ‘skus’, rather
      than changing it to ‘sku’). When I saved and reloaded the page, the content
      area was blank.
    - Next, I corrected ‘skus to ‘sku’ and it still was blank.
 * What finally got it working again was to switch to the text view, get rid of 
   the HTML and then enter the ‘product_page’ shortcode again.
 * What’s really odd is that a) the products shortcode worked fine, even though 
   it had HTML mixed in with it. b) that I can’t get the editor to mangle the product_page
   shortcode with HTML now.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘ShortCode does’t work’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 12 replies
 * 6 participants
 * Last reply from: [eas](https://wordpress.org/support/users/eas/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/shortcode-doest-work/#post-10485433)
 * Status: resolved