06 Jun, 2004
Show/Hide Comments in WordPress II – wp-dropdown-comments.php
Posted by: Jennifer In: WordPress|WordPress Hacks
In the interest of making things simpler – I created a special version of the wp comments page that you can just upload and be done with it.
So:
1) you need the show/hide more plugin installed. (if it isn't already)
2) Download this file, save it as "wp-dropdown-comments.php" into your wordpress install directory.
3) add the following line to your index.php where you want your dropdown comments to display:
<?php include(ABSPATH . 'wp-dropdown-comments.php'); ?>
Note: that line does NOT!! replace your wp-comments.php line.
An additional note I'll make here and on the show/hide more (post) version:
Make sure you have the following in your template! (It's in the original WP index.php template, but if you're creating your own, you may have easily forgotten to include it) :
<?php wp_head(); ?>
That line would go in between your <HEAD> </HEAD> tags.
Please post any problems/bugs in the comments. I've tested it on a test blog, but not extensively.
FYI – I recently made a change to the "show/hide more" plugin so it will automatically do the show/hide more on your posts without your needing to change your template – but if you wanted to keep your more links the way they were (because you only wanted to use the plugin for drop-down comments) – comment out this line in the plugin: add_action('the_content', 'the_contentshowhide'); by putting two slashes // in front of it.
Related posts:
- Multiple Featured Content Galleries On a site I was working on recently, the client...
- Two Blocks of Content for Pages in WordPress I just saw this plugin show up on the WordPress...
- Adding a block of HTML to a WordPress post One problem with the WYSIWYG editor in WordPress is that...
Related posts brought to you by Yet Another Related Posts Plugin.
scriptygoddess
