[Plugin: Facebook AWD All in one] Optional Classes Description from post….
-
Hi there, I think it is my server not clearing the cache for the CSS file, but I noticed there is not any way to specify a class for the various FB elements. Could this be added to the plugin in the future? That would be really helpful to be able to move things around.
Also, I spent a couple hours trying to figure out how to get the Description for the Open Graph to pull something besides the Excerpt (the site has over 500 posts and most don’t have excerpts). Tried getting an auto-excerpt generator but they all were too bulky or did a bunch of other things that I didn’t want for the site (like replace the Read More link with some nasty looking one). Anyhow, I came across another plugin that handles the description really well (WP Facebook Open Graph Protocol). This may be unethical for you to add their code to your plugin but I just pasted this into line 1998 of AWD_facebook.php:
if(empty($options['og:description'])) echo "\t<meta property='og:description' content='".esc_attr(str_replace("\r\n",' ',substr(strip_tags(strip_shortcodes($post->post_content)), 0, 160)))."' />\n"; /* echo '<!-- '.__("WARNING Description is empty", $this->plugin_text_domain).' | '.$this->plugin_name.' -->'."\n"; */And that creates a Description from the post’s content itself. Possibly helpful to other people out there trying to generate descriptions on the fly for Open Graph.
Great plugin, thanks!
The topic ‘[Plugin: Facebook AWD All in one] Optional Classes Description from post….’ is closed to new replies.