Tagged: x
-
AuthorPosts
-
May 26, 2016 at 8:21 pm #1012116
_agusParticipantHi!
I wish to know how to output the share block in all my posts! I saw the discussion: https://community.theme.co/forums/topic/adding-social-share-to-all-my-existing-posts/
and found out that the following code works fine! Problem is: it displays after every content, even my home page. Is there a way to display the share block only if it is_single() or is_singular(‘post’)?
add_action(‘x_before_the_content_end’, function() {
echo do_shortcode(‘[share title=”Compartilhe esse Post!!” facebook=”true” twitter=”true” google_plus=”false” linkedin=”false” pinterest=”true” reddit=”true” email=”true”]’);
});Thanks!
May 26, 2016 at 11:25 pm #1012383
NicoModeratorHi There,
Thanks for writing in.
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
You could also try removing the sharing block using custom CSS. For example,
.home .x-entry-share{ display:none; }Hope it helps.
Let us know how it goes.
Thanks.
May 27, 2016 at 2:59 am #1012586
_agusParticipantHi!
I achieved what I wanted to! I just added a “if (is_single())” but it seems it also affects the portfolio. So a kept with is_singular(‘post’).
add_action(‘x_before_the_content_end’, function() {
if ( is_singular(‘post’) ) {
echo do_shortcode(‘[share title=”Compartilhe esse Post!!” facebook=”true” twitter=”true” google_plus=”false” linkedin=”false” pinterest=”true” reddit=”true” email=”true”]’);
}
});Now, I notice that when sharing content on facebook, there is no featured image or text in the posts. Only one of my blog posts is outputting the feature image when I fb-share it (???). I enabled open graphic. So, again, the problems are:
1. When sharing, facebook-posts don’t show the excerpt.
2. When sharing, facebook-posts don’t show the featured image.
3. One blog post does output the image on FB, but with it’s dimensions. My images have lots of different dimensions. After solving the second problem, is there a way to crop them when facebook posting?
May 27, 2016 at 3:10 am #1012598
Rue NelModeratorHello There,
To assist you better with this issue, would you mind providing us the url of your site with login credentials, if necessary, so we can take a closer look? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password (only if necessary)Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thank you.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1012116 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
