WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Twitter Tools] wp.me working under Twitter Tools (3 posts)

  1. Tony Scott
    Member
    Posted 4 years ago #

    I'm sure missing something obvious here - but has anyone got Twitter Tools to work with the wp.me url generated from the Stats plugin?

    I've got this far in functions.php

    add_filter('tweet_blog_post_url','makewpme');
    
    	function makewpme($url) {
    	$wpmeurl = get_shortlink($post_id);
    	return $wpmeurl;
    	}

    However, this keeps returning my home url, not the post url.

  2. hollywoodgrind
    Member
    Posted 4 years ago #

    Instead of:

    $wpmeurl = get_shortlink($post_id);

    try:

    $wpmeurl = get_shortlink(get_the_ID());

    NerdGrind.com

  3. Tony Scott
    Member
    Posted 4 years ago #

    Hi hollywoodgrind

    Thanks for that but still returning site url rather than individual post url using your suggestion.

    Anyone else?

Topic Closed

This topic has been closed to new replies.

About this Topic