How can we help?

If you are looking for support for our PokaTheme, this is the place!

Home Forums PokaTheme support Social Share problem

Viewing 10 posts - 1 through 10 (of 25 total)
  • Author
    Posts
  • #17920
    Ricardo Nuno
    Participant

    Hi,

    When we try to do the sharing via social, we encounter some problems,

    Share via twitter, is adding ” between the title. It should be clean.

    View post on imgur.com

    Share via mail, adding strange characters to the subject of the email and the text of the email.

    View post on imgur.com

    Thanks,

    #17924
    admin
    Keymaster

    Hi Ricardo,

    Thanks for pointing this out.

    You can solve this by adding the following PHP code to your child theme’s functions.php. Also it will be solved in the next theme release.

    function poka_social_share() {
    	global $post;
    	$permalink = esc_url( get_permalink( $post->ID ) );
    	$title     = rawurlencode( get_the_title() );
    	?>
    	<ul class="social-icons">
    		<li>
    			<a class="icon poka-facebook icon-btn icon-btn--gray jsSocialShareIcon" href="http://www.facebook.com/sharer.php?u=<?php echo esc_url( $permalink ); ?>" title="<?php esc_html_e( 'Share on Facebook', 'poka' ); ?>" data-width="520" data-height="350" rel="nofollow"></a>
    		</li>
    		<li>
    			<a class="icon poka-twitter icon-btn icon-btn--gray jsSocialShareIcon" href="http://twitter.com/share?text=<?php echo esc_html( $title ); ?>&url=<?php echo esc_url( $permalink ); ?>" data-width="520" data-height="350" title="<?php esc_html_e( 'Share on Twitter', 'poka' ); ?>" rel="nofollow">
    			</a>
    		</li>
    		<li>
    			<a class="icon poka-envelope icon-btn icon-btn--gray" href="mailto:?subject=<?php echo rawurlencode( __( 'I wanted you to see this site', 'poka' ) ); ?>&body=<?php echo rawurlencode( __( 'Check out this site:', 'poka' ) ); ?>&nbsp;<?php echo esc_url( $permalink ); ?>" data-width="520" data-height="350" title="<?php esc_html_e( 'Share by email', 'poka' ); ?>" rel="nofollow">
    			</a>
    		</li>
    	</ul>
    	<?php
    }
    
    #17929
    Ricardo Nuno
    Participant

    Hi,

    Thanks for the info.

    I directly applied the fix on /inc/core/helpers.php

    But, Regarding the email seems to have fixed, but in twiiter, there is still a problem with characters, in this case a title that has characters like: ”

    Appears after ‘ ’

    Example: title is “How to win ‘the bets’ knows how”

    On share: How to win ‘the bets’ knows how https://..

    PS: I take this opportunity to suggest adding more ways to share the post, such as whatsapp, telegram…

    #17940
    admin
    Keymaster

    Hi again Ricardo,

    I updated the code. Check the below:

    	function poka_social_share() {
    		global $post;
    		$permalink = esc_url( get_permalink( $post->ID ) );
    		$title     = get_the_title();
    		?>
    
    			<ul class="social-icons">
    				<li>
    					<a class="icon poka-facebook icon-btn icon-btn--gray jsSocialShareIcon" href="http://www.facebook.com/sharer.php?u=<?php echo esc_url( $permalink ); ?>" title="<?php esc_html_e( 'Share on Facebook', 'poka' ); ?>" data-width="520" data-height="350" rel="nofollow"></a>
    				</li>
    				<li>
    					<a class="icon poka-twitter icon-btn icon-btn--gray jsSocialShareIcon" href="http://twitter.com/share?text=<?php echo wp_kses_post( $title ); ?>&url=<?php echo esc_url( $permalink ); ?>" data-width="520" data-height="350" title="<?php esc_html_e( 'Share on Twitter', 'poka' ); ?>" rel="nofollow">
    					</a>
    				</li>
    				<li>
    					<a class="icon poka-envelope icon-btn icon-btn--gray" href="mailto:?subject=<?php echo rawurlencode( __( 'I wanted you to see this site', 'poka' ) ); ?>&body=<?php echo rawurlencode( __( 'Check out this site:', 'poka' ) ); ?>&nbsp;<?php echo esc_url( $permalink ); ?>" data-width="520" data-height="350" title="<?php esc_html_e( 'Share by email', 'poka' ); ?>" rel="nofollow">
    					</a>
    				</li>
    			</ul>
    
    		<?php
    	}
    
    #17942
    Ricardo Nuno
    Participant

    I confirm that it is now ok!

    Thank you

    #17943
    admin
    Keymaster

    You’re welcome!

    #17963
    admin
    Keymaster

    This is just an update that we have released a new PokaTheme version and we have included a fix for this issue, too. Feel free to check your account downloads and get the latest version!

    #18006
    Ricardo Nuno
    Participant

    Hi,

    I found today that the problem is not yet fully resolved.

    If there is a “+” character in the title, it is blank at the time of sharing.

    Example title: “Top Casinos + Top Bets”, if your share, “Top Casinos Top Bets http….”.

    #18016
    admin
    Keymaster

    Hi Ricardo,

    Thanks for pointing this out, we’ll check it and provide a fix for it if necessary in the next theme release.

    #18017
    Ricardo Nuno
    Participant

    Hi,

    If possible, you can post the fix here too (if it’s easy), and thus avoid waiting for a new update.

    Thanks,

Viewing 10 posts - 1 through 10 (of 25 total)
  • You must be logged in to reply to this topic.