WordPress.org

Ready to get started?Download WordPress

Forums

Facebook AWD All in one
[resolved] Optional Classes + Description from post.... (5 posts)

  1. 82concepts
    Member
    Posted 2 years ago #

    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!

    http://wordpress.org/extend/plugins/facebook-awd/

  2. AHWEBDEV
    Member
    Plugin Author

    Posted 2 years ago #

    Thank you! this will be added in next release.

  3. AHWEBDEV
    Member
    Plugin Author

    Posted 2 years ago #

    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.

    For sure i will add it.

  4. 82concepts
    Member
    Posted 2 years ago #

    Awesome!

    Oh, I'm having an issue with thumbnails but I'll make another post.

  5. AHWEBDEV
    Member
    Plugin Author

    Posted 2 years ago #

    For the issue with description, done in http://trac.ahwebdev.fr/issues/142

    For Css classes each plugin have his own css class on each container.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic