Little Hacks...

read morepost a comment Saturday, November 6, 2010; 10:23 AM

Two things today. First, I've updated my portfolio to use the Disqus comment system. Woohoo!

Second, for anyone who might be interested. As some may know, Tumblr will repost your posts to Twitter and Facebook. However, it links back to your tumblr page - which, in my case, is not what I want. I want the posts to link back to my website.

Well, I found a very simple hack. If you are a Tumblr user, go to the customize page for your Tumblr account. Look under "Advanced" then look for the "Add Custom CSS" box. In that box, at the very bottom (or just replace it all with the following) enter this text:

</style>
<script type="text/javascript">
<!--
window.location = "http://yourWebsite.com/"
//-->
</script>

Of course, you need to replace "yourWebsite.com" with your actual website. Then click Save or Save+Close. You can still access your customize page on your Tumblr account, but it will display your website, rather than the sample Tumblr page. To undo the redirect, just remove the block of code from the "Add Custom CSS" box.

Easy breezy!
~Mattie

Tags: , , , , , , , ,

Blog | Code | Tips & Tricks | Tumblr

Comments (1) -

Mattie
Mattie United States
12/10/2010 12:56:13 PM #

Actually, here is a better code block. This one will redirect to the same post on your own site - providing you are handling an input parameter "id" to load a specific post.

</style>
<script type="text/javascript">
<!--
var oldurl = "" + window.location;
var urlparts = oldurl.split("/");
var postid = urlparts[4];

if (postid>0) {
window.location = "http://yourWebsite.com/default...="; + postid;
} else {
window.location = "http://yourWebsite.com";; }
//-->
</script>

Reply

Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading


Log in