hazlebury 0 Report post Posted February 12, 2011 Please could you advise how I might be able to get shortcodes working in the Excerpts (e.g. my [add_to_cart] shortcode). I've googled this and there do seem to be some amendments to the functions.php but I don't want to muck about with programming if I can help it. Share this post Link to post Share on other sites
kastelic 6 Report post Posted February 12, 2011 Make sure you are in HTML mode when adding shortcodes. Other than thad you'd have to tell us a little more about your specifics. Share this post Link to post Share on other sites
hazlebury 0 Report post Posted February 12, 2011 To get the "add to cart" button, Cart66 requires placement of a short code in the post content (each product is a post). However, when I view the category page with the abbreviated content, the short code gets stripped out by the theme, even if I put it at the beginning of the content area of the post. Share this post Link to post Share on other sites
kastelic 6 Report post Posted February 12, 2011 Have you tried putting your shortcode and whatever you want as the excerpt into the excerpt box (below the post content) of your post/item? Share this post Link to post Share on other sites
hazlebury 0 Report post Posted February 12, 2011 Yes, short codes get stripped from excerpts Share this post Link to post Share on other sites
catrina 103 Report post Posted February 13, 2011 The excerpts aren't particularly code-friendly. Have you searched for a plugin that might allow the excerpt to take code? Please read the docs before posting. Please do not private message me unless I ask you to. Designer | Catrina Dulay Founder | Catrina and Mouse Share this post Link to post Share on other sites
hazlebury 0 Report post Posted February 14, 2011 Yes, no joy Share this post Link to post Share on other sites
Kate 3 Report post Posted February 14, 2011 Hi Patrick - There's a couple other options. First, you could choose to show the full content for your blog area, instead of just excerpts. Then manually insert the <!-- more --> tag wherever you want the post to cut off. Second: using manual excerpts (the box that appears below your main post edit screen) should allow you to add the shortcode... But I can't remember 100%. I'd have to check. Finally, another option is to use the "Advanced Excerpt" plugin. Then, in your template.postloop.php (preferably a copy in your child theme) you could write an if statement that basically says: if advanced excerpt plugin exists, use that. If not, use the default wordpress excerpt. Now, maybe you'd consider that "mucking around in the code"... but it would be pretty straightforward Let us know if you need help implementing any of those, or the option you found with functions.php. Share this post Link to post Share on other sites
hazlebury 0 Report post Posted February 14, 2011 Hi, the first solution doesn't work because the More tag strips the shortcode - possibly in the same way that Platform Pro also does when it lists out the posts with "continue reading". The second doesn't work because shortcodes can't be put in Excerpts. The third doesn't work because Advanced Excerpt generates a javascript error. Share this post Link to post Share on other sites
bryan-hadaway 3 Report post Posted February 15, 2011 Patrick, the first one is what I would also have recommended, I see no reason why it wouldn't work unless the shortcode simply wasn't working in the first place no matter what the circumstance. Can you please try the first solution again and post a link so I can see what's happening myself? Thanks, Bryan Share this post Link to post Share on other sites
hazlebury 0 Report post Posted February 15, 2011 there is a more tag after "placing calls". the short code is working on the post page. my problem is that I want the add to cart on the category page. http://www.happyshield.co.uk/2011/02/mobile-pouch/ http://www.happyshield.co.uk/category/products/mobile-phone/ Share this post Link to post Share on other sites
Kate 3 Report post Posted February 15, 2011 Hi Patrick: Did you make sure you set the post pages to display the full content? Share this post Link to post Share on other sites
hazlebury 0 Report post Posted February 15, 2011 Hi, I gave up with Cart66 (ex PHPurchase) and have gone with a Paypal solution that works fine. Phew. Share this post Link to post Share on other sites