Tagged: x
-
AuthorPosts
-
August 13, 2016 at 7:16 pm #1130231
Philip MParticipantHi Guys,
is there any way to stop the shortcode text from appearing in my product feed (it’s for for Google Shopping) when using the Short Description box?I use the product short description with this shortcode – [x_alert type=”success”]My description here.[/x_alert].
The shortcode appears in Visual mode as well as Edit mode, which doesn’t happen with other text enhancements, so I’m not too hopeful, but thought I’d ask anyway.
Thank you.
August 14, 2016 at 1:06 am #1130484
ChristopherModeratorHi there,
Please provide us with URL of page in question and login credentials so we can take a closer look.
Thanks.
August 14, 2016 at 4:50 am #1130649
Philip MParticipantThis reply has been marked as private.August 14, 2016 at 5:38 am #1130679
ThaiModeratorHi Philip,
Please add the following code under functions.php file locates in your child theme:
add_filter('the_excerpt_rss', 'x_custom_feed'); add_filter('the_content', 'x_custom_feed'); function x_custom_feed( $content ) { global $post; if ( ! is_feed() ) return $content; // Remove all shortcodes $content = strip_shortcodes( $post->post_content ); return $content; }Hope it helps 🙂
August 14, 2016 at 6:55 am #1130731
Philip MParticipantHello Thai,
thanks for the quick response.
I added that and regenerated the feed, but unfortunately the shortcode text is still showing as before.My products are added as products with WooCommerce, not posts, is it something to do with that?
Thanks again,
Philip.August 14, 2016 at 8:11 am #1130761
ChristianModeratorHey Philip,
Sorry for the confusion. This requires filtering of the WooCommerce short description content. Regretfully, this would need custom development which regretfully falls outside the scope of our support. You might want to contact our trusted partners who caters X setup and customization needs. Please see https://community.theme.co/custom-development/. This article might also help.
Thank you for understanding.
August 14, 2016 at 9:14 am #1130794
Philip MParticipantHi Christian,
ah, that’s a pity.
Thanks anyway,
Philip.August 14, 2016 at 10:00 am #1130824
RupokMemberYou are welcome Philip!
August 14, 2016 at 5:40 pm #1131058
Philip MParticipantHi,
just thinking, if I could change the background colour of the Product Short Description box on the front end, that would be nearly the same as what I’m doing with the shortcode. Then I could remove the shortcode.
Is that something I could with some CSS?
I know it would apply to every product on the site then, but that’s no problem.
Thanks again,
Philip.August 14, 2016 at 10:29 pm #1131326
Rue NelModeratorHello There,
To resolve your issue and change the background color of the product short description box, please add the following css code in the customizer, Appearance > Customize > Custom > CSS
div[itemprop="description"] { padding: 15px; background-color: #e5e5e5; } div[itemprop="description"] p{ margin-bottom: 0; }Hope this helps.
August 15, 2016 at 4:52 am #1131641
Philip MParticipantHi Rue Nel,
that’s great, it did the trick. I wish I had thought of it sooner, would have saved me loads of work 🙂
Thank you and best regards,
Philip.August 15, 2016 at 5:15 am #1131661
ThaiModeratorYou’re most welcome 🙂
If you need anything else please let us know.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1130231 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
