Tagged: twitter
-
AuthorPosts
-
November 24, 2016 at 11:45 pm #716622
Hi,
if I share one of my blogposts in twitter the post image doesn’t show up. What can I do about that? Any ideas?
Thanks,
EllieNovember 25, 2016 at 9:15 am #716724Hey e_zips,
You can set the image you want to display on social networks using a plugin like Yoast SEO: https://wordpress.org/plugins/wordpress-seo/. Please try that out to see if you have any luck with it.
Best regards,
RikardNovember 25, 2016 at 9:31 am #716734Hi Rikard,
I’ve already used Yoast Seo and it works pretty well with facebook but not with Twitter.
Any idea why?Best regards,
EllieNovember 25, 2016 at 2:22 pm #716846Hi Rikard,
I’ve figured out the problem. There was a typo in the setup protocol. Now, that I’ve changed it the twitter tab is displayed.
Unfortunately, the theme does not use the data from there. For this post “http://www.shortcuts.life/2016/11/24/zeit-fuer-weihnachtskarten/” I’ve included all information in the twitter-tab but it doesn’t show up when tweeting the post. Any idea?Best,
Ellie- This reply was modified 7 years, 12 months ago by e_zips.
November 28, 2016 at 7:26 am #717594Hi!
The image is not included in the “share pattern”. You can filter the pattern with the following code.
add_filter('avia_social_share_link_arguments', 'avia_add_social_share_link_arguments', 10, 1); function avia_add_social_share_link_arguments($args) { $thumb = wp_get_attachment_image_src( get_post_thumbnail_id(), 'masonry' ); $args['twitter']['pattern'] = 'https://twitter.com/share?text=[title] '.$thumb[0].'&url=[shortlink]'; return $args; }
// https://kriesi.at/support/topic/large-twitter-card-for-post-share-icon/#post-662746
Best regards,
IsmaelNovember 28, 2016 at 9:36 am #717632Hi Ismael,
thank you very much for your reply. I copied the code in the functions.php of my child theme but then my page didn’t work any longer. What exactly am I supposed to do with the code? Sorry for asking such a question but I’m a beginner.
Thank you,
EllieNovember 29, 2016 at 5:58 am #718101Hey!
I can’t see the code anywhere in the functions.php file. Did you remove it? We want to add it again but it will break the site if the function got duplicated. The filter should include the featured or attached image in the sharing pattern.
Best regards,
IsmaelNovember 29, 2016 at 10:35 am #718146Hi Ismael,
I had to remove the code as it broke the page. What do you mean by “the function got duplicated”? I still don’t know where to put which code. I hope that there is a solution which adds the post preview picture automatically when someone shares the post on Twitter.
Thanks for your patience.
Best,
EllieDecember 2, 2016 at 1:38 pm #719669Hi,
please provide us ftp access, so we can have a deeper look into this. Post login details here as private reply.
Best regards,
AndyDecember 2, 2016 at 4:54 pm #719804Hi Andy,
please find the details in the private section. It would be great, if you could have an look at this post. If I try to share it in facebook there is a picture from my instagram account enclosed, which has nothing to do with the pictures in the post. With Twitter I never get any picture.
Best,
EllieDecember 7, 2016 at 4:44 am #721329Hi,
We were able to add the filter in the functions.php file without creating any errors but it’s not working as expected. Do you have some kind of server cache? The same filter is working fine on our installation.
Best regards,
IsmaelDecember 7, 2016 at 10:40 pm #721735Hi,
I have no idea. What exactly do you mean by server cache? How can I find out?
The only thing I con think of is this bit in the htaccess file:
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml# Remove browser bugs (only needed for really old browsers)
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
</IfModule>Is this of any help? I just removed it, so you can try!
Best regards,
Ellie- This reply was modified 7 years, 11 months ago by e_zips.
December 12, 2016 at 5:06 am #722913Hi,
I have no idea. What exactly do you mean by server cache? How can I find out?
Please ask your hosting provider. If you check the functions.php file, you can see the filter with the var_dump function but it’s not affecting the site. It should at least display NULL if the variable is empty but it’s not doing anything.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.