- This topic has 4 replies, 2 voices, and was last updated 13 years, 6 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore General Questions › Shortcodes Don't Work in Theme
The theme I am using does not recognize the WP eStore shortcode, and simply displays the code as text, not as an “Add to Cart” button.
The theme is from ElegantThemes.com (My Product).
The suggestions from the theme developer have not worked.
I know you guys don’t support themes, but can you suggest a workaround I can use? Perhaps something I can embed into the theme directly to trigger the sales process?
Any assistance is appreciated. Thanks!
gary
Not sure what a theme has to do anything with shortcodes. You place a WordPress shortcode in a post or page and WordPress will process it. Are you trying to place shortocodes in the theme’s template file (the php files)? WordPress shortcodes do not work in template files (this is how WordPress works) this is why we also provide the PHP functions. The shortcodes list also has PHP functions that you can use from your theme’s template file:
http://www.tipsandtricks-hq.com/ecommerce/wp-estore-shortcodes-and-functions-reference-460
Thanks for the reply.
Yes, I understand the shortcodes go in the post. The odd thing in this theme is that the short codes work properly when the page is displayed, but not in the excerpt of the post. The default behavior of the theme is to display the excerpt on the home page, where the shortcode doesn’t work.
Arrghh.
I can’t place it in the theme files as I don’t want it to appear everywhere in the site.
Back to the theme developer to see if I can change things so the post itself displays on the home page, rather than the excerpt.
I knew this was not a support issue for you and didn’t really expect a solution — just askin’. No blame to the plugin in my mind.
Thanks anyway.
gary
By default WordPress won’t filter shortcode in excerpt either. There is a line of code you can add in the plugin which will turn on shortcode filtering in the excerpt (I forget the line… Google search should do the job).
More info on this here:
https://support.tipsandtricks-hq.com/forums/topic/display-add-to-cart-button-in-post-list