7

There's a reason people say that you shouldn't download free themes from outside of wordpress.org, they might contain hidden surprises In your case, the theme inserts an advertisement at the beginning of the post content div: <div style="position:absolute;top:0;left:-9999px;">Want create site? Find <a href="http://dlwordpress.com/">Free ...


6

It appears that your site doesn't use the core WordPress Featured Image feature but instead uses a custom image field (probably from Advanced Custom Fields). Yoast's plugin, Jetpack, and presumably many others look for the Featured Image image when setting the opengraph meta tag. So you have two options: Use the core Featured Image feature with one of the ...


5

To answer this one and point to the real problem: As the <head> HTML tag comes far before the actual loop, you'll need something else than the global $post. get_queried_object(); get_queried_object_id(); The plugin The code is tested and works. As you might want to keep this functionality when switching themes, I'd suggest wrapping it up in a ...


5

Fast 'n' Hacky The problem can be solved by changing line 319 in facebook.php to the following: if (is_home()) { This way, the front page is not treated as a home page but as a regular page, for which the facebook feature settings can be applied (and will be handled correctly). More Elegant/Complex Here is a non-hackish version. Put the following in ...


4

There is no built-in way to extract an image/image-src from the post body. If the images are attachments you can do it with get_children or WP_Query, and wp_get_attachment_image_src. function get_image_src_from_content_101578($content) { global $post; $args = array( 'post_parent' => $post->ID, ); $images = get_children($args); foreach ($...


4

The wpseo_opengraph_image filter can only be used to modify the existing og:image. Otherwise, you will need to hook into the wpseo_opengraph action to add a different image. Here's an example of adding an image from a custom field on the post object (assuming you're using ACF here). function my_wpseo_opengraph() { global $post; if (isset($post)) { ...


4

Facebook caches the meta values for performance. So it is currently hosting an old version of the shared URL. You need to use the Facebook debugger, and Fetch new scrap info. This will update the stored meta values of the post. To confirm that it works, I have already fetched new data for the respective URL and this is how it looks when I share it on FB: ...


4

As was already stated, Facebook automatically detects images if the OG image tag is missing. However, in some cases, it might detect other images (e.g. not from your post but from other content). In that case, it can be useful to fetch a list of all images attached to the post and use the one you like, or, as you suggest, the first one. The example below ...


3

If it's only for Facebook purposes that you need it, you could add the following code to your header.php file (between <head> and </head>): <meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/> Of course replace the URL in content="..." with your own image URL. A reference for all the Facebook meta tags is here: http://...


3

WordPress plugins repository has plenty ... have you tried the Official Facebook plugin? I'd always recommend you search the plugin repository first and then come here and explain what plugins you have installed.


3

You're getting the error because the Facebook and All In One Event Calendar plugins are both declaring the fb_admin_dialog() function, but PHP only allows a function to be declared once. To fix the immediate problem, log in to your server with S/FTP and rename the wp-content/plugins/all-in-one-event-calendar directory to something like all-in-one-event-...


3

First, this isn't a WordPress specific question, it's a Facebook question. Secondly, Facebook caches pages, they don't crawl them on every submission. If you have a URL that has already been submitted to Facebook before, then they will have already crawled it for the OG data once before, and saved it to their cache. If you later change the OG data, they won'...


3

Go to Settings > Sharing in your dashboard Sroll down until the "Button Style" option. Choose "Official Buttons". The Facebook Share button has now changed into a Facebook Like Button. Save your changes, and you'll be good to go! If you want to add a Facebook Share button next to the Like button, you can use the "Add a new service" option: In "Service ...


3

There are a number of explanations here: https://developers.facebook.com/docs/facebook-login/access-tokens The time it takes for your server to talk with facebook does contribute to a good amount of slowdown. So it depends on how intensely you plan to use the api. In that case, storing the key and other fb related user data can cut that cross-talk ...


2

This might help you out if you haven't found an answer yet. /* BEGIN Custom User Contact Info */ function extra_contact_info($contactmethods) { unset($contactmethods['aim']); unset($contactmethods['yim']); unset($contactmethods['jabber']); $contactmethods['facebook'] = 'Facebook'; $contactmethods['twitter'] = 'Twitter'; $...


2

You can show Facebook and Pinterest sharing tools on the Nextgen lightbox with this tool: http://sharemygallery.com You want a facebook comment box. Unfortunately, this doesn't do that. This plugin puts Facebook and Pinterest sharing buttons at the bottom of the image browser. It may help you if you just want to get people stared sharing your NextGen ...


2

The fb-open-graph.php (latest version's file) right inside the extracted folder of the plugin is (solely) responsible for adding Open Graph meta data to the header of your site. Below is how I've modified the code in the file so that it's fit to be added to your theme's functions.php: /* Facebook Open Graph Markup In Header * from /facebook/fb-open-graph....


2

If it is a page the global post object is already set when wp_head fires. But you have to get the data for this page with custom code. Pseudo code: add_action ( 'wp_head', 'wpse_58539_get_ogp' ); function wpse_58539_get_ogp() { if ( ! is_page_template( 'your-template-name' ) ) { return; } $page = get_post( $GLOBALS['post'] ); ...


2

The problem is that the canonical url on all of those pages is http://www.lbjrealestate.com/property/. You either need to generate a custom canonical link for your pages, or provide an og:url tag for Facebook to read. Enter your url in the debugger to see what Facebook sees.


2

there was a closing bracket missing in the second line; and you need to reference the first array element of $image: <?php if (has_post_thumbnail( $post->ID ) ): ?> <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ) ); ?> <link rel="image_src" href="<?php echo $image[0]; ?>"> <?php endif; ?> ...


2

I've done it, here is the complete code: function insert_facebook_likes_custom_field($post_ID) { global $wpdb; if (!wp_is_post_revision($post_ID)) { add_post_meta($post_ID, 'likes_count', '0', true); } } add_action('publish_page', 'insert_facebook_likes_custom_field'); add_action('publish_post', 'insert_facebook_likes_custom_field'); ...


2

Figured it out with function postimage($size = 'thumbnail', $qty = -1) { if (is_single() && !is_home() && !wp_attachment_is_image()) { global $post;$images = get_children(array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'posts_per_page' => $qty, 'post_mime_type' => 'image') ); if ( $...


2

After some more thought, I got it figured out. It involves multiple functions to go through each step of the process, but here it is: https://gist.github.com/4355955


2

Three simple steps to generate a Facebook Avatar: Create an extra field in your comment form for the user's facebook profile (see e.g. WP Engineer for a code example and how to) If the user filled out this field, get the facebook avatar (see this question) Replace the WP avatar with your facebook avatar if a fb profile url is set All together in this Gist (...


2

I don't have the plugin to test this, but looking at the lines to hack, as pointed by @tf: if ( is_home() || is_front_page() ) { $enabled_features = get_option( sprintf( $option_name, 'home' ) ); } else if ( is_archive() ) { // all archives wrapped in one option // is_post_type_archive || is_date || is_author || is_category || is_tag || is_tax ...


2

First line of the codex for get_content: Displays the contents of the current post. This template tag must be within The_Loop. Also, this line: <meta property="og:description" content="<?php string_limit_words(the_content(), 15);" ?> /> would need to get_the_content(), as the_content() will output, and you need to return. <meta ...


2

I don't use this plugin, but it looks like this comment template is loaded with add_filter( 'comments_template', array( 'Facebook_Comments', 'comments_template' ) ); The simplified structure of this comment template looks like: if ( have_comments() ) : // ... wp_list_comments( $_comment_options ); // ... endif; $_facebook_comments = ...


2

The usage of curl in PHP is not considered good practice in WordPress. It comes with HTTP API to abstract network requests. It will use curl when available, but still work via other backends if it's not and allow you to use WP debug plugins to troubleshoot requests, such as Core Control.


2

How can i immidiately know if a user has posted a comment? There is a hook called "wp_insert_comment", that is executed right after the comment is added. This actions passes 2 arguements first the comment id and the second is the comment. How can i know which user is that? Well it depends on if the user is a registered subsriber of your blog. Use the ...


2

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 ...


Only top voted, non community-wiki answers of a minimum length are eligible