Integrate open graph protocol without plugin?

This information doesn’t have to be static. Here’s an example: <meta property=”og:title” content=”<?php if ( is_single() ) { wp_title(); } else { bloginfo(‘name’); } ?>” /> <meta property=”og:type” content=”blog” /> <meta property=”og:url” content=”<?php echo get_permalink() ?>” /> <meta property=”og:site_name” content=”<?php bloginfo(‘name’) ?>” /> Images are a little tricker. I like using the featured image if … Read more

Website Preview Graphic for WordPress Site

The accepted answer over on StackOverflow looks to be the best way to do this. You’ll want to get into your header.php file to make these changes. https://stackoverflow.com/questions/6693499/how-can-i-set-a-website-image-that-will-show-as-preview-on-facebook Now if the image should change from post to post, I would probably write something using JQUERY to change the value of the meta tag on the … Read more

Correctly implementing the Facebook Like button

Yoast.com actually covered this quite recently… if ( is_singular() ) { global $post; if ( current_theme_supports(‘post-thumbnails’) && has_post_thumbnail( $post->ID ) ) { $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘thumbnail’, false); echo ‘<meta property=”og:image” content=”‘.$thumbnail[0].'” />’; } echo ‘<meta property=”og:title” content=”‘.get_the_title().'” />’; if ( get_the_excerpt() != ” ) echo ‘<meta property=”og:description” content=”‘.strip_tags( get_the_excerpt() ).'” />’; } … Read more

Open Graph in posts loop page

As far as I know this is not possible the way you’re trying to get it to work. You can specify an image for Facebook to use in the <meta> tag, but that’s about it. One thing you can try is use JavaScript to invoke the Facebook feed dialog. It has a picture parameter: picture … Read more

Facebook preview Open Graph Object Debugger

Try this: In your functions.php put this function fb_excerpt($text, $excerpt) { if ($excerpt) return $excerpt; $raw_excerpt = $text; $text = strip_shortcodes( $text ); $text = apply_filters(‘the_content’, $text); $text = str_replace(‘]]>’, ‘]]&gt;’, $text); $text = strip_tags($text); $excerpt_length = apply_filters(‘excerpt_length’, 55); $words = preg_split(“/[\n\r\t ]+/”, $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY); if (count($words) > $excerpt_length) { array_pop($words); $text … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)