scriptygoddess

20 May, 2004

Show Hide "more" with WordPress

Posted by: Jennifer In: WordPress Plugins

Here is a plugin for wordpress using the latest version of the "show/hide" script (which lets you include other text inline, as well as opens up the doors to use the same function for comments) as seen here here. (Of course that post was written for MT)

Current Version: v. 1.4
Last Updated: 8/30/04 8:42 PM EST
See Bottom of post for changelog

Installation Instructions:


Step 1:
Download and "install" this plugin.
(ie. right-click and save that file with a .php extension. Then upload it to your plugins directory, which is located in your wordpress folder: wp-content/plugins)

Step 2: (optional)
I made that plugin for my own purposes with the text you see on this site. If you want the text to say something different – then you'll need to modify it.

(There was a step 3 – but it's not neccessary any more in ver 1.2 of this plugin)

Disclaimer: This is my first attempt to hack WP. The disclaimer in the sidebar VERY MUCH applies. I am NOT an expert. Especially when it comes to WP. So, go easy on me 😉

If you'd also like to do show/hide comments: see this post for ideas on how to edit your wp-comments and/or this post for a seperate file you can upload and use (wp-dropdown-comments.php)

An additional note I'll make here and on the show/hide more (comments) 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.

Change Log
new in ver 1.4
Bug fix for preview on edit post page (in the admin) thanks to Neil Stead

new in ver 1.3
Minor bug fixes thanks to Tormod

new in ver 1.2.2
Took Tormod's suggestions on code clean-up.

new in ver 1.2.1
echo was changed to return
priority added to add filter (thanks Kendra)

new in ver 1.2:
Added "add action" line (as suggested by Tormod) – so now you do not need to change your index template or any other plugins – use "the_content" as you normally would!

156 Responses to "Show Hide "more" with WordPress"

1 | Chelle

April 1st, 2005 at 10:21 am

Avatar

Just an FYI for anyone using the Miniblog plugin, something tres weird happens when you have that and Jennifer's show hide more plugin.

For some reason, the mini blog plugin will pull from a WP blog entry as plug it into the mini blogs a few times over. The S/H will function though..it also won't play nice with the nextpage tag either, but I suspect that's something to do with the theme [Wuhan].

Haven't had much chance to look at it, and I've disabled the S/H plugin until I can see what's what. Just thought I'd mention it, cause I really like the more tag behaving this way than as is.

2 | Caitlin

April 18th, 2005 at 2:38 am

Avatar

Great plugin, it took me hours to find it, and of course it's on the most obvious site!

When I use the "read more right here" option, it doesn't open up inside the same page as it does on your site. Any ideas why this might be? Is that a different script altogether?

3 | Jo

May 19th, 2005 at 5:56 pm

Avatar

Just installed the read/hide plug in –THANK YOU! Works like a charm. I even went in and took out the Read here or line and had no problems.

6 | INTERESTIC NEWS » Blog Archive » WordPress???????????(3)

December 8th, 2007 at 6:59 am

Avatar

[…] Google??????????????????????? scriptygoddess » Blog Archive » Show Hide “more” with WordPress […]

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements