Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #392334

    Hello!
    Re the social toolbar (see bottom of this page: http://www.tripreads.com/istanbul)
    All of the icons, when clicked direct to the “pretty” permalink, except Twitter, which links to http://www.tripreads.com/?p=19.
    Any way to fix this? I’m using the Enfold child theme.
    Thanks!

    #392337

    Hey Jennifer!

    It doesn’t because of the Twitter character limit, if you want to change it you’d need to edit /includes/helper-social-media.php and change line 147:

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

    To:

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

    To have this mod on a child theme you can copy the whole avia_social_share_links class to your child functions.php.

    Regards,
    Josue

    #392342

    Ah – I thought that URLs were shortened to a specific character length regardless of link length.
    Nevertheless, very helpful. Thank you!

    #392381

    You are welcome, glad to help :)

    Cheers!
    Josue

    #400346

    Hello again. This was super helpful — one follow up question though. The share options are coded to pull the WordPress page title rather than its SEO title. Is there another shortcode that I can substitute for text=[title] to have it pull the SEO title instead?
    Here’s an example:
    http://www.tripreads.com/italy/
    Twitter (and others) currently pulls only “Italy” rather than “Italy Travel Reading List”
    Thanks!

    #400360

    Hey!

    Try changing this line:

    $replace['title'] 		= !isset($this->post_data['title']) ? get_the_title() : $this->post_data['title'];
    

    To:

    $replace['title'] 		= get_post_meta($post->ID, '_yoast_wpseo_title', true);
    

    Best regards,
    Josue

    #431040

    Hi! Finally getting a chance to revisit this. Thank you for the code – that works for the other social networks, but not Twitter. For Twitter, it leaves a blank space. Any suggestions? Thank you!

    #431145

    Hm, that’s strange. Can you please create us a WordPress administrator account? post it here as a private reply.

    Regards,
    Josue

    #431526
    This reply has been marked as private.
    #431688

    Hi Jennifer!

    Should work now, check it.

    Cheers!
    Josue

    #431724

    Works! Thank you, Josue :)

    #431743

    You are welcome, glad to help :)

    Regards,
    Josue

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