Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › Displaying categories in a sidebar using shortcode
- This topic has 5 replies, 4 voices, and was last updated 10 years, 11 months ago by admin.
-
AuthorPosts
-
April 8, 2011 at 11:22 pm #3144riverayMember
I see that you can do the following: Display a list of all categories in a stylish way from a Theme file (eg. Sidebar, header, footer) using this code: <?php echo show_all_categories_stylish(); ?>.
As I’m not familiar enough with how to add the code to the appropriate place, can you explain a bit more how I can use it to display a list of categories in the primary or secondary sidebar?
Thanks!
April 9, 2011 at 12:20 am #31179amin007ParticipantYou simply add a text widget to your sidebar and use the following shortcode:
[wp_eStore_list_categories_fancy]
You should be able to use shortcodes on the sidebar if you use the Text Widget.
April 9, 2011 at 6:02 pm #31180riverayMemberThanks. Very helpful as I hadn’t used the text widget before. I tried the fancy version and decided I preferred the list version so I added this short code:
[wp_eStore_list_categories count=true]
and it displays very nicely. However, even though the categories act as links, when I click on any of the category links they don’t display the items in the category in the content area. Here is the link to the page – [https://sbtrails.org/outdoor-store/]. The categories display very nicely in the left sidebar but nothing happens if you click on any of them.
Still learning how things work. Appreciate any help you can give. BTW, might you be thinking of allowing sub-categories at some point??
April 10, 2011 at 12:08 am #31181amin007ParticipantWhen you create the categories in eStore you need to give a URL in the “Category Target URL” field so it knows where to go and show the products for that category.
So create a WordPress page (example: Category A products) and use a shortcode on this page to show all the product from category A. Now, use the URL of this page in the “Category Target URL” field.
December 22, 2013 at 6:00 pm #31182captbdelMemberWhat about displaying Products in a SIDEBAR? by name or name + quantity? I cannot see if that is possible.
December 22, 2013 at 10:24 pm #31183adminKeymasterUse any of the following fancy product display templates to display the product on the sidebar (or anywhere on your site):
http://www.tipsandtricks-hq.com/ecommerce/stylish-product-display-options-for-wp-estore-829
You can also use the shortcodes mentioned in the following post to just show the parts that you want to show:
-
AuthorPosts
- You must be logged in to reply to this topic.