WordPress.org

Ready to get started?Download WordPress

Forums

Flare
Permalink change and loss of social sharings (2 posts)

  1. Karinshibata
    Member
    Posted 11 months ago #

    Hello,

    I have recently changed my permalink from the default (/?=postid) type to /%category%/%postname%/ and lost my social sharing counts.

    Here are two link I was inspired to resolve that problem.

    http://encosia.com/preserving-social-sharing-counters-through-a-url-change

    http://lutfitorla.com/keeping-sharethis-digg-digg-social-counts-after-a-wordpress-permalink-change

    Here is the code I tried to adapt (I'm a more than a newbie in this...)
    and it's not working... I try to paste it at the beggining of the Flare coding...

    If anyone had an idea of what is wrong...

    Thank you !

    $sharing_url = get_permalink();
    
    $url_change_id =572;
    $post_id = get_the_ID();
    
    $sharing_url = get_permalink();
    
    if ($post_id < $url_change_id) {
    $url_id_postfix = "/?p=" . $post_id;
    
    $sharing_url = str_replace("://karinshibata.com" . ('Categories'), "://karinshibata.com" . $url_id_postfix, $sharing_url);
    }

    http://wordpress.org/plugins/flare/

  2. joaogarin
    Member
    Posted 7 months ago #

    For a very simple solution check :

    http://joaogarin.com/article/changing-permalinks-wordpress-keeping-social-proof

    This is working for the digg digg plugin.

    Best regards,
    Joao Garin

Reply

You must log in to post.

About this Plugin

About this Topic