-
AuthorPosts
-
January 3, 2014 at 3:24 am #204836
Hello,
I’m using the Enfold theme and using the “AddThis Share” widget in the sidebar of our site. On some pages clicking the Facebook share icon grabs a photo (not always the first one) and the first block of text. On other pages, it doesn’t grab any text or images from the page. The configuration of the pages using the advanced template layout are very similar. I’m wondering if there is a way to configure a page so the correct image and text can be pulled into the Facebook share post. I’ve tried adding a Featured image on some pages and also tried the excerpts box. Neither of these solved the issue. Any insights would be most appreciated. Thanks!
John
Test Site:
http://www.johngdoyle.com/unmanitempsite/about/January 3, 2014 at 9:40 am #204923Hi jgdoyle1!
Please try to edit header.php, find this code:
<meta charset="<?php bloginfo( 'charset' ); ?>" />
Below, add this code:
<meta name="description" content="<?php echo get_the_excerpt(); ?>" /> <link rel="image_src" href="<?php echo avia_image_by_id(get_post_thumbnail_id(), 'large', 'url'); ?>" />
Make sure that you set a featured image on every post or page. Modify the excerpt using the Excerpt metabox. Enable it on Screen Options then tick the Excerpt.
Regards,
IsmaelJanuary 3, 2014 at 10:00 am #204931Hey!
I recommend to install http://wordpress.org/plugins/wordpress-seo/ and then you can use the “Social” tab/options: http://www.clipular.com/c/5678826713513984.png?k=2EpKGdnQl0mtbk_vvn_O5O2cfYY to specify some content for the social sharing services (description, image for facebook and google+, etc.)
Regards,
PeterJanuary 3, 2014 at 8:31 pm #205130Ismael,
I added the script you recommended to the header php file but no luck. There is a Feature Image set and an excerpt defined for the linked page I posted above. The source code for the page seems to be grabbing this info but the Facebook share still shows no image or description text. Any ideas? Again, I’m using AddThis plugin for social sharing.
Thank you!
John
January 4, 2014 at 7:06 am #205265Hi!
I’m sorry about that. Have you tried Dude’s recommendation? I’m sure it will work. :)
Cheers!
IsmaelJanuary 4, 2014 at 10:35 pm #205436Hello Dude,
I attempted Ismael’s fix above but it didn’t seem to work. So I installed WordPress SEO as you recommended. I’m using the default settings. On the About page I set the Facebook Description and Facebook Image under the Social tab. This is having no effect when clicking the AddThis Facebook icon from the right sidebar. The information is not being picked up from the code for some reason. I see the correct content in the meta properties tags but it’s not showing up in the Facebook posting. Any ideas or suggestions would be greatly appreciated.
Thanks.
JohnTest site page:
http://www.johngdoyle.com/unmanitempsite/about/January 5, 2014 at 7:22 am #205497Hey!
Please modify the code that I gave you. Replace it with this:
<meta property="og:title" content="<?php echo get_the_title(); ?>"/> <meta property="og:description" name="description" content="<?php echo get_the_excerpt(); ?>" /> <meta property="og:image" content="<?php echo avia_image_by_id(get_post_thumbnail_id(), 'large', 'url'); ?>" />
Remove browser cache then reload the page a few times. Test it on another browser. Let us know if it helps.
Cheers!
IsmaelJanuary 5, 2014 at 7:06 pm #205626Ismael,
Thank you for the new code. I deactivated WordPress SEO and added the code snippet you sent above. I’m still receiving the same results in both Safari and Firefox. I took some screen grabs of the code and Facebook posting in case you’re not seeing the same thing as I am. After updating the header.php file I reset the browser and cleared all cache and history. Then I quite the browser and restarted it, then reloaded the page 3 times. Then I clicked on the Facebook share icon in the right hand column. I keep getting the same posting message, “This is a page excerpt. It will get displayed for search results”. Not sure what’s going on. That text is not even in the source code for this page so I don’t know where it’s pulling it from.
Any other suggestions? Thanks.
John
johngdoyle.com/code-samples.zip
January 6, 2014 at 3:46 am #205743Hi!
At this point you’ll need to wait for Facebook to re-pick up the correct data. I would recommend sticking with the WordPress SEO route as Yoast’s code and plugins are considered the top tier by most developers in proper SEO and even Social settings when using WordPress.
Edit – You can try forcing Facebook to refresh its content by throwing the url in their debug here; https://developers.facebook.com/tools/debug
Best regards,
Devin- This reply was modified 10 years, 10 months ago by Devin.
January 7, 2014 at 9:02 pm #206453Thank you all for your feedback and support. Your support team is great! The WP SEO by Yoast seems to be working fairly well. I got some pages to work and others I’ll have to wait for Facebook to pick up the updated info. Thanks again!
Best regards,
John -
AuthorPosts
- The topic ‘AddThis Facebook icon doesn't grab proper text or photo.’ is closed to new replies.