KGVID embed code registering as the description field on Facebook
-
When syndicating posts to Facebook through an RSS syndicator, I’ve noticed that the descriptions for my posts are nothing more than jiberish. The result of putting my KGVID video at the beginning of a post.
I’ve resolved the issue by adding this to my functions.php
function removeKGVIDRSS($content) { global $post; if (shortcode_exists ( 'KGVID' ) ){ $content = remove_shortcode( 'KGVID', $content) ; } return preg_replace( '/\[[^\]]+.+]/', '' , $content, -1); } add_filter('the_excerpt_rss', 'removeKGVIDRSS'); add_filter('the_content_feed', 'removeKGVIDRSS');
What it does is keep the kgvid shortcode from executing in the feed, then using a preg_replace, removes the code and its contents altogether from the feed while leaving the posts on the site intact.
I just wanted to share this in case anyone else has this problem.
https://www.ads-software.com/plugins/video-embed-thumbnail-generator/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘KGVID embed code registering as the description field on Facebook’ is closed to new replies.