Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #579178

    Hello there

    I use the default twitter and facebook share button on my blog posts but they do not give you a twitter/facebook handle in the tweet

    Can you tell me how I can get this to loaded in by default blog post settings . http://www.staffordrc.org
    thanks

    Alastair

    • This topic was modified 8 years, 9 months ago by StaffordRC.
    #579580

    Hey!

    Try adding this at the very end of your theme / child theme functions.php file:

    add_filter('avia_social_share_link_arguments', 'avia_add_social_share_link_arguments', 10, 1);
    function avia_add_social_share_link_arguments($args)
    {
    	$args['twitter'] = array("encode"=>true, "encode_urls"=>false, "pattern" => "https://twitter.com/share?text=[title]&url=[shortlink]&via=USERNAME");
    	return $args;
    }

    Cheers!
    Josue

    #579747

    Thanks for your reply and solution Josue

    but to clarify, as I am a bit blind when it comes to the layout and functions of the Dashboard area

    but should I copy and paste

    add_filter(‘avia_social_share_link_arguments’, ‘avia_add_social_share_link_arguments’, 10, 1);
    function avia_add_social_share_link_arguments($args)
    {
    $args[‘twitter’] = array(“encode”=>true, “encode_urls”=>false, “pattern” => “https://twitter.com/share?text=%5Btitle%5D&url=%5Bshortlink%5D&via=USERNAME”);
    return $args;
    }

    into my Quick CSS window which is located under General settings. If so I already have the following code there.

    article span.fallback-post-type-icon {
    display: none;
    }
    .avia-content-grid-active .slide-image { display: none !important; }

    So should I place the new code in front of or below the existing?

    thanks once again for your help, cheers

    #579923

    Hi!

    No, not there. Try the following:
    1. Install this plugin.
    2. Go to Plugins > Edit Functions.
    3. Paste the code there and Save.

    Regards,
    Josue

    #580283

    Thanks Josue

    got is sorted : )

    thanks for all your help its greatly appreciated

    cheers Alastair

    #580343

    You are welcome, glad to help :)

    Regards,
    Josue

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