Return to Snippet

Revision: 11492
at February 7, 2009 00:17 by kristarella

Initial Code
function custom_jquery() { ?>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
        $("p#show_comments > a").click(function(){
<?php }
add_action('wp_head', 'custom_jquery');

function show_comments() {
if (is_single()) {
    echo '<p id="show_comments"><a href="#comments">Show Comments</a></p>';
add_action('thesis_hook_after_post', 'show_comments', 99);

Initial URL

Initial Description
This is a bit of jQuery within a PHP function that you can dump into your Thesis custom_functions.php file to hide comments upon page load and add a link to show them.

Initial Title
Hide/Show Comments on single pages

Initial Tags
php, jquery

Initial Language