Skip to content

Instantly share code, notes, and snippets.

@rafael
Created March 28, 2012 03:10
Show Gist options
  • Save rafael/2223249 to your computer and use it in GitHub Desktop.
Save rafael/2223249 to your computer and use it in GitHub Desktop.
Custom tubmlr 404 page
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1.7.1");
</script>
<script type="text/javascript">
$(document).ready(function() {
var text_posts = $('.post-type-text')
var not_found_title = $('.post-type-text').find('.post-content').children('h3').text()
if(text_posts.length == 1 && not_found_title == "Not Found"){
$('.post-type-text').find('.post-content').children('p').text('This is a test to customize 404');
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment