Adding the Category Menu and Product Search Widgets to Your WordPress blog
page last edited on 27 December 2016
The addon X-Cart 5 to WordPress Integration support has been discontinued. If you wish to sell products via your blog, we recommend the addon Buy button; it enables you to add product widgets with the Buy button right into your blog posts. If, however, you are interested in adding a Wordpress blog into your X-Cart online store, then consider the Blog System in X-Cart 5 addon.
The WordPress Integration for X-Cart 5 provides two additional widgets that you can use in your WordPress blog to improve the shopping experience of your blog readers:
- Category menu widget This widget enables your blog readers to view your X-Cart store’s categories right from your blog.
- Product search widget This widget provides a Search field that allows your blog readers to search for products in your X-Cart store’s catalog without leaving your blog.
The above widgets can be added to the sidebar of your WordPress blog website:
or to any post in your WordPress blog:
Note that the Product search widget can only be displayed once per page:
- It is possible to add the Product search widget to more than one blog post, but it will be displayed only in the most recent post.
- If the Product search widget is enabled in the sidebar of the blog website, any instances of this widget added to blog posts will not be displayed.
To add a widget to the sidebar:
- In your WordPress admin interface, go to the Widgets section (Appearance > Widgets).
- In the Available Widgets list, locate the widget you want to appear in the sidebar.
- Add the widget to the Widget Area:
- Drag and drop the widget from the list of Available Widgets to the Widget Area section on the right: or
- Click on the widget name and select Add Widget. The widget will be added to the Widget Area section automatically.
- If necessary, edit the title under which the widget will appear in the sidebar.
- If necessary, change the order of widgets in the sidebar by dragging the widgets in the Widget Area section to the desired positions.
Now if you check the result in the blog, you should be able to see the widget added to the sidebar.
To add a widget to a blog post:
- In your WordPress admin interface, locate the blog post in which you would like the widget to appear.
- Open the post for editing.
In the post - at the location where you want the widget to be displayed - insert one of the following:
(for the Category menu widget)
(for the Product search widget).
For the sake of example, we added both the widgets to one post:
- Save the post.
Now if you check the result in the blog, you should be able to see the widget in your post.
Help make this document better
This guide, as well as the rest of our docs, are open-source and available on GitHub.