Ive recently setup a tumblr blog for a company account. On tumblr when someone reposts or comments on a post they get shown up in the comments section, which in tumblr is called notes.
For an example see this post here : http://minimalist.co/post/49073058900/robert-downey-jr-by-greg-williams#notes - See the links to other tumblrs at the bottom (not my tumblr blog but you get the idea)
These links are all nofollow
which is fine, but the issue im having is that some of these sites may contain adult content, and because this is a business account, it cant link to adult content.
Is there a way to remove the href
from these links so they cant be clicked through, either doing it server side by editing the tumblr theme, or client side using JS ?
UPDATE
Ive found i can remove the notes completly by removing these lines from the theme :
{block:PostNotes}
section class="post_notes">
<a name="notes">
{PostNotes}
</a>
</section>
{/block:PostNotes}
But these removes the notes feature completely, what id prefer to do is still have the notes but not allow them to be links.
UPDATE 2
This is the html used on the page
<li class="note reblog tumblelog_sixtensason without_commentary">
<a rel="nofollow" class="avatar_frame" target="_blank" href="http://sixtensason.tumblr.com/" title="Sixten Sason in wonderland" sl-processed="1">
<img src="http://38.media.tumblr.com/avatar_ed56f53ce743_16.png" class="avatar " alt="">
</a>
<span class="action" data-post-url="http://sixtensason.tumblr.com/post/110092976968">
<a rel="nofollow" href="http://sixtensason.tumblr.com/" class="tumblelog" title="Sixten Sason in wonderland" sl-processed="1">
sixtensason
</a>
reblogged this from
<a rel="nofollow" href="http://example.com" class="source_tumblelog" title="Interior design blog - LLI Design London" sl-processed="1">
example
</a>
</span>
<div class="clear">
</div>
</li>
I updated the the JS to the below, but to no avail, any ideas ?
<script type="text/javascript">
$(document).ready(function(){
$('span.action a').attr('href','');
$('li.note a').attr('href','');
});
</script>
Might need to see your blog, or some more specific markup but there is a way to remove the href with jquery.
jQuery tends to ship along with many templates but if yours doesn't have it you just need to add a single line of code.
Something like
$(document).ready(function(){
$('.post_notes a').attr('href','');
});
This says get all anchors inside the post_notes element and set the href to an empty string.
Checking in some of my themes I can see that there are tumblr template links which can be removed from the template they look like href="{Permalink}"
, but I think for the postNotes block you cannot edit the href, as far as I can tell.
EDIT:
Or you could disable the click event:
$('.post_notes a').click(function(){
return false;
});