Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #494218

    Hi,

    is it normal that sharing posts via Twitter button (in social buttons at the bottom of posts) the link appearing like : http://mywebsite.com/?p=6083 instead of a full and right link http://mywebsite.com/category/post?

    #494235

    Hey Anton!

    Twitter only allows a certain amount of character per tweet so it makes sense to use small permalinks like that. If you switch to pretty permalinks then the URL might get truncated and not work.

    If you still want to change it then open up /enfold/includes/helper-social-media.php and change line 148 from

    'twitter' 	=> array("encode"=>true, "encode_urls"=>false, "pattern" => "https://twitter.com/share?text=[title]&url=[shortlink]"),

    to following

    'twitter' 	=> array("encode"=>true, "encode_urls"=>false, "pattern" => "https://twitter.com/share?text=[title]&url=[permalink]"),

    Cheers!
    Yigit

    #494251

    Yigit,

    indeed you’re right. I’ve tested with permalink and the native version seems to be better.

    On the other hand, could I add some “via @… by @…” info by default in this twitter sharing additionally to the post’s name and link, in order to create a viral promotion and notifications for different authors?

    #494625

    Hey!

    In the pattern url, you can add more content inside the “text” query:

    ?text=[title]addmoretexthere&url=[shortlink]
    

    Or add a new parameter. Refer to this link: https://dev.twitter.com/web/tweet-button/parameters

    Best regards,
    Ismael

    #495287

    this thread is resolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘wierd link generated by Twitter button’ is closed to new replies.