Tagged: https://toquesrobes.com/
Hi,
A simple permalink structure is used when I click on Social Share Button (ie https://toquesrobes.com/?p=123) even if another permalink structure is spedified on settings page (ie Custom Structure like https://toquesrobes.com/%category%/%postname%/).
How should I change this ?
Many thanks for your help
Best regards
Jorge
Hey Jorge,
Thank you for the inquiry.
Are you referring to the URL in the twitter social icon? You can try this filter in the functions.php file to adjust the URL pattern.
add_filter('avia_social_share_link_arguments', 'avia_add_social_share_link_arguments', 10, 1);
function avia_add_social_share_link_arguments($args)
{
global $post;
$permalink = get_the_permalink($post->ID);
$title = get_the_title($post->ID);
$args['twitter']["pattern"] = 'https://twitter.com/share?text=' . $title . '&url=' . $permalink;
return $args;
}
Best regards,
Ismael