I use the Jason theme and I like the style a lot. But I recognize the sharing options are somehow messed up. For example, when I want to share a blogpost to Facebook, the pop-up looks like this.

Seems to have no content. And when I hit "Share Link", nothing happens. Neither closes the pop-up, nor is something published on Facebook.
When I click the little Twitter bird, two pop-ups appear one above the other. (I dragged them next to each other in this screenshot.)

The tweet will be published, but the URL included – although working – looks broken. (Twitter card due to my manually inserted code, if that’s of interest.)
<blockquote class="twitter-tweet" lang="en">
Aus den Memoiren des SeΓ±or Havvelpaff (62) http://<a href="http://t.co/cTMRl8638Q”>http://t.co/cTMRl8638Q”>http://t.co/cTMRl8638Q
— -drik S. (@drikkes) <a href="March”>https://twitter.com/drikkes/status/572674992091086848″>March 3, 2015
<script async src="//platform.twitter.com/widgets.js" charset="utf-8">
Coming to Google+, the only service which seems to work properly. Unfortunately I didn’t like Google, so may I ask where to get rid of that service? But I have a minor problem with all three sharing buttons. I like the mouseover effect showing the colour of each service. However, after using one of the sharing buttons, they all turn to Twitter blue. See.

Is that a problem only on my site http://drikkes.com/ or is this a general theme issue? And how can I solve it? Thanks in advance for help!
@hendrik : hi there , you can try this
open file "single.php" in Jason theme , go to line 38 u can see those code :
<ul class="social-links list-inline">
<li class="facebook"><a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo esc_url( $url ); ?>&t=<?php echo esc_html( $title ); ?>" title="<?php _e( 'Share this post on Facebook', 'dw_jason' ) ?>" ><i class="fa fa-facebook"></i></a></li>
<li class="twitter"><a href="https://twitter.com/intent/tweet?url=<?php echo esc_url( $url ); ?>&text=<?php echo esc_html( $title ); ?>" title="<?php _e( 'Share this post on Twitter', 'dw_jason' ) ?>"><i class="fa fa-twitter"></i></a></li>
<li class="google-plus"><a href="https://plus.google.com/share?url=<?php echo esc_url( $url ); ?>" title="<?php _e( 'Share this post on Google Plus', 'dw_jason' ) ?>"><i class="fa fa-google-plus"></i></a></li>
</ul>
you can try replace all that echo esc_url( $url );
to echo esc_attr( $url );
.
hope that help π
if still not work , then try to remove that esc_url()
or esc_attr()
, just leave the $url
there π
Sorry to ask again, I’m quite a coding idiot. I replaced all three esc_url( $url );
with esc_attr( $url );
– one for Facebook, one for Twitter, one for Google+. I assume you either forgot to "echo" in the first code or doubled it in the second? (I tried both, with and without "echo") Result is this:
Facebook-Sharing now works. But Twitter still pops up twice. And all three logos are twitter-blue after using the share function.
try to remove that esc_url() or esc_attr(), just leave the $url there
Sorry, I didn’t get this. When I do exactly as you suggest, only the URLs show up in the sharing pop-ups, no preview content. I guess I do something wrong?
@hendrik : well i found out the main problem with the sharing function is that when use esc_url( $url )
, the link will be print out like this : " http:\http:\esc_attr( $url );
will work with facebook but i’m not sure a bout twitter , then you can try only use $url
, don’t need those escape function
, that’s my idea π
and about that color after sharing , the logos have no color change , you can try deactivate some plugins to test and check what plugin that effect the color and twitter share π
Glad π
I’m not able to make this work properly. So I threw out the whole theme’s sharing code and embedded WP’s own sharing feature.
Well i think you could remove the WP’s own sharing feature and try remove the esc_url() as i said , that’s the main point of this problem i think :), it could be some conflicts within this theme sharing and WP’s own sharing feature that make css
code go wrong because as i tested , the icon does not change color after you share π it’s just change when you hover π
Please login or Register to submit your answer