You can add the Buy button embed code to individual posts and the menu on your WordPress blog's homepage.
You can also use embedded collections with custom themes to create an entire eCommerce site in WordPress.
Embedded Buy buttons are compatible with the WordPress.org platform — but NOT with WordPress.com because it strips custom script tags embeds.
This documentation describes WordPress 4.2.2. Your version might be different.
Add the Embed Code to a Post
To add your embed code to an individual post:
1. In your X-Cart admin, create a Buy button and copy its embed code from the Embed Code dialog (or click Copy embed code to clipboard):
2. Click Add New to create a new post, or click the name of an existing post that you want to display a Buy button.
3. From the Add New Post or Edit Post page, change the text editor from Visual to Text mode and paste the embed code into the editor main text field in the place where you want the Buy Button or collection to appear:
4. When you are done, click Save Draft, Preview, or Publish. Once published, the Buy button will be visible in the post.
Add the Embed Code to a Menu
To add your embed code to a menu on the homepage:
1. From your WordPress dashboard, find Appearance, and open the Customize page to enable the theme editor, and then click Widgets:
2. Click the name of the area where you want to add the Buy Button or custom cart code:
3. Open an existing Text widget, or click Add a Widget, and then click Text:
4. Paste the embed code into the Content text field within the Text widget and save the changes:
5. The Buy button is now visible as a widget: