Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore General Questions › Shortcodes Don't Work in Theme
- This topic has 4 replies, 2 voices, and was last updated 14 years, 8 months ago by
amin007.
-
AuthorPosts
-
March 29, 2011 at 11:36 pm #3050
GraphicBass
MemberThe 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
March 30, 2011 at 1:17 am #30844amin007
ParticipantNot 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
April 14, 2011 at 6:27 am #30845GraphicBass
MemberThanks 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
April 14, 2011 at 9:04 am #30846amin007
ParticipantBy 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).
May 11, 2011 at 4:06 am #30847amin007
ParticipantMore info on this here:
https://support.tipsandtricks-hq.com/forums/topic/display-add-to-cart-button-in-post-list
-
AuthorPosts
- You must be logged in to reply to this topic.