There may be another way to do this, but I wanted to show the excerpt, but only if I had actually typed something in. Just doing the following, will show part of the post if there's no excerpt (maybe I was doing it wrong?):
<?php the_excerpt(); ?>
In any case, I use the "excerpt" field for "Guest author" information. So I have it only display when there IS guest author information by doing the following:
<?php if ($post->post_excerpt != "" ) {
echo "<p><b>".$post->post_excerpt."</b></p>";
}
?>
Comments Off on Optionally show excerpt
I'm in the middle of migrating everything into wordpress. Things may be a little wacky until everything's in place
Update: well, it looks like the only problem I have is that some of the older posts with previous authors got messed up. We're talking about posts over two years old. Over time I'll try to fix whatever posts I notice, but I have to admit it will not be a top priority for me.
If you notice anything wacky – please email me or leave a comment.
Todo:
Fix feeds
fix pda ver.
change resources page to use WP link manager
One of the things I wanted to do was be able to highlight certain posts that were particularly important. Probably not useful on all types of blogs – but on this one, where some comments with links, or suggestions, or alternate methods of doing something, may go unnoticed in a busy, highly commented post, I wanted to be able to point to a few and make sure people saw them…
I had actually originally asked MooKitty for a plugin/hack that would do it:
Here is her script.
I think her solution is very well-done. It means updates to the interface so you can easily see which post was noted as "important", etc. However, after having lived through a few MT upgrades, I've been trying to avoid editing any core WordPress code, so that I don't have to start worrying about a dozen hacks I could lose when I upgrade my CMS.
Here's my solution. It may not be as elegant, but it gets the job done.
Read the rest of this entry »
03 Jun, 2004
Posted by: Jennifer In: Bookmarks
Matt posted a link to Alex's javascript quick tags.
I'll need to update my "deCoder" javascript using that (if I can) – since Alex's javascript DOES work with Firefox – and my (current) deCoder does not.
PLEASE NOTE: Development of this plugin has (for some time now) been taken over by Mark – you can download the latest version from his site here
This plugin will allow your readers to get email notifications when comments are left on a post after their own. The install is very simple and does not modify any WP core code. As well, it's future-proofed to work, as is, with the next version of WordPress without your needing to upgrade the plugin.
Here's the download
Current Version: 1.5
(Support for 1.2 ends with v. 1.4.4 – still available here)
Last Updated: 3/10/04 9:53 PM EST
Here's the instructions (also included in a text file in the download):
Read the rest of this entry »
02 Jun, 2004
Posted by: Jennifer In: Scripts
Update by Jennifer: In the interest of making things easier – please also see this post for a version of wp comments you can use. Upload it and be done.)
The cool thing about WordPress being a PHP-based dynamic system is that a certain part of your site, such as the wp-comments.php file, can take on a different form or function depending on its use. Here's how to make expandable/retractable comments.
This tutorial assumes that you are using Jenn's Show hide "More" plugin, which places the necessary JavaScript into the head of your WordPress pages. Although it uses that JavaScript, no modification of the plugin is needed, we can handle all of this by modifying our index.php and wp-comments.php files.
It also requires my Get Comments Count plugin.
Read the rest of this entry »
02 Jun, 2004
Posted by: Jennifer In: Bookmarks
One of the recurring complaints against WordPress is that its only means of "protecting" posts is by password, which means that everyone knows a private post exists — including the title, post data and time — but only the "select few" get to read it. LiveJournal users can restrict post visibility to their friends list; and other blog packages with more granular access controls can restrict posts in various ways.
I've created a modification for WordPress 1.2 that allows authors to select a minimum user level required to see posts. If a user is logged in, and of sufficient level, they see the post. If the user is not logged, or not of sufficient level, they see no indication that private posts exist: nothing on the index, search, syndication feeds, or calendar display.
See the details here
I have a random quote and also a random link on my sidebar. Since I have 99 links and 190+ quotes, it was easiest to use a MySQL db to manage it. This is the query I was using:
$sql = "SELECT * FROM blogroll ORDER BY rand() LIMIT 1";
The problem I had was that it wasn't really random. When I had about 10 links in my blogroll, I hit refresh 80 times and got the first entry EVERY TIME. It worked better when I had more entries, but I still got that first one way too often. I tried to use the mt_rand() function, but it wouldn't work in the query. I had create a variable that used mt_rand() to pick a number within my range and then call that id in the query. So when I deleted a link or added a new one, it broke.
Then I found the following on php.net:
$sql = "SELECT * FROM blogroll ORDER BY rand(" . time() . " * " . time() . ") LIMIT 1";
This works MUCH better, and it's showing a lot of links and quotes that almost never showed up before. Hope that helps someone!
30 May, 2004
Posted by: Jennifer In: Bookmarks