Oh, I see what you’re saying now. Okay, I’ve implemented a new action hook in the latest version 0.7.18, released today, called tumblr_crosspostr_reblog_key
that prints a post’s reblog_key
, or fetches and saves it upon viewing the post if we don’t already know it. This means you can use the following code inside your theme files during The Loop like a template tag to print the reblog key:
<?php do_action('tumblr_crosspostr_reblog_key');?>
To make a reblog link like the one above, do this inside The Loop:
<a href="https://www.tumblr.com/reblog/<?php echo get_post_meta($post->ID, 'tumblr_post_id', true);?>/<?php do_action('tumblr_crosspostr_reblog_key');?>?redirect_to=<?php echo esc_url(get_permalink());?>">
The reason I suggest using do_action()
instead of calling the template tag directly (tumblr_reblog_key()
) is because if you ever choose to deactivate Tumblr Crosspostr but forget to remove the call to its custom template tag in your theme, your site will encounter a PHP fatal error.
Hope this helps. Let me know if you have any trouble.