WordPress.org

Ready to get started?Download WordPress

Forums

WP Tweet Button
Specify different URL (2 posts)

  1. OkiPoru
    Member
    Posted 1 year ago #

    I changed the subdomain of my blog, so the old blog URL [www.domain.com/blog] has become [blog.domain.com]
    Is there anyway to use the tweetbutton() function to specify the old URL rather than the new one? This will allow me to keep the previous tweet counts.

    http://wordpress.org/extend/plugins/wp-tweet-button/

  2. Tanin
    Member
    Plugin Author

    Posted 1 year ago #

    If you used to use a URL shortener, those old short urls will remain the same (unless you manually clear the shorturl cache).

    But I'm afraid you can't change the domain without some modification to the tw_get_long_url function. You'd have to copy this line:

    $perms= esc_url('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);

    and paste before this line:

    if (is_object($my_transposh_plugin) && $addlang){

    and change

    change $_SERVER['SERVER_NAME']

    to

    'blog.domain.com'

    Tanin

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic