Welcome to Dagon Design. In addition to free scripts, WordPress plugins, and articles, we offer a variety of services including custom theme design, plugin creation, and PHP scripting. Contact me for more information.

Version 1.8   Updated Thursday, August 14th, 2008 at 8:20pm

Latest Post from each Category plugin for WordPress

This plugin displays a list of the latest post from each category of your WordPress installation. It can be added to a post or page, or used directly in a template file. In the plugin’s options page you can choose the sort order, show or hide the dates, select the date formatting, show the first X characters of the content, display a link to the comments, and show comment counts, as well as other options.

Download

Installing

  • Download the above file, rename it from .txt to .php, and upload it to your plugins directory.
  • Enable the plugin.
  • Configure the plugin options (under DDLatestFromEach).

Using

There are two ways you can use this plugin.

1) In a post or page, insert the following line:

<!-- ddlastfromeach -->

2) In a template file, insert the following code:

<?php echo dd_last_from_each(); ?>

Change Log

  • 08-14-08 Version 1.8 - Tested with WordPress 2.6. Now uses WordPress function for determining date/time to show up to date posts. Added option to exclude categories.
  • 09-27-07 Version 1.7 - Updated to support WordPress 2.3. Added ‘Load Default Options’ button.
  • 05-31-07 Version 1.6 - Better support for international date formatting
  • 05-16-07 Version 1.5 - Updated for WordPress 2.2
  • 02-20-07 Version 1.4 - Updated for WordPress 2.1 (new pages were showing up in the default category)
  • 08-09-06 Version 1.3 - Added options to show comment links and counts. Also added an optional limit to the number of links shown, and a few other fixes.
  • 06-03-06 Version 1.2 - Added an option to turn category names into links. A bug was also fixed where extra slashes were being shown in the header text.
  • 05-31-06 Version 1.1 - You can now choose the sort order of the output, hide password-protected posts, and show the first X characters of the content after each post. A few other fixes have been made as well.
  • 05-30-06 Version 1.0 - First release.

Demo

Here you can see the plugin in action:

Latest Post From Each Category

Options

Here are the options available in this plugin’s options page in the WordPress admin panel.

Header text

This is shown above the list of posts.

Sort order

You can choose to have the data sorted by category or date. You also have the option of ascending or descending on both.

Show link to comments

When enabled, this will add a link to the comments for each post listed.

Include number of comments

This option only applies if Show link to comments is enabled. It adds the number of comments to the comment link.

Include link for posts with no comments

This option only applies if Show link to comments is enabled. It allows you to include or hide the comment link for posts with no comments.

Turn category names into links

Enabling this option will turn category names into links to the categories.

Hide password-protected posts

This prevents password-protected posts from showing up.

Show date after listed posts

This will show the post date after each post in the list.

Date format

If you are showing the date after posts, this will allow you to configure the date format (using the standard PHP date() format)

Show first X characters of posts

This allows you to show a preview of the content under each post in the list.

Number of characters to show

This lets you specify how many characters of the content will be shown, assuming you have the previous option enabled.

Limit list to X categories

This allows you to set a limit on the number of categories that will be shown in the list. Set to 0 for no limit.

Excluded category IDs

This is a comma-separated list of category ID’s you want excluded from the list.

  1. I am having trouble using the inline shortcode .

    When my post renders, it shows:

    ” with a grey background instead of the processed output.

    I am using Wordpress 2.6.2 and the Arthemia Theme.

    Is anyone else getting this error? Please help.

    Thanks,
    == slm ==

  2. Hi,

    I’ve tried the plugin but there’s no output… I’m using WP 2.6.1 and plugin version 1.8
    I’ve tried inserting it into a template and in a post/page content… to no avail.
    Have you got an FAQ or some other info to troubleshoot this?

    Thanks in advance!

  3. Thank for plugin

    It’s good job.

  4. 217
    Nyo

    Forget to mention, I’m using WP 2.6.1
    P.s: tried even with a custom template and the php code but nothing…

  5. 216
    Nyo

    Plugin doesn’t work!! I Can’t figure how.. I’ve written via html editor of wordpres, but It gives nothing when I view the page…. please help!!

  6. Hi - thanks for this. Two points - I’d LOOOOVE a simple plugin like this written backwards -i.e. I just want to put the latest posts from ONE category on a page.

    Currently, I have to achieve that by ‘omitting’ all my categories except one.

    The other thing made me smile is - do you know your file is actually called ‘dd-lastest-from-each’ not ‘latest-from-each’? ;-)

  7. great job!

    but it would of been perfect if it allows me to show like 5 or X number of posts by category.

  8. Hi - love the concept - but just wondered if you can tailor the sitemap for individual pages (in the html for each page I guess), as opposed to a single global customise at the settings>plug-in level?

    Many thanks,
    Mark

  9. I thought you’d like to see what can be done with your plugin.
    Check out http://greenprophet.com/categories
    Thank you for making it possible!

  10. Hi! Great idea! Two questions/suggestions:
    1. Is there a way of playing with the style/css?
    2. Can one exclude subcategories?
    Thanks!

  11. 210
    Koen

    Can I show more posts from each catagorie? I only have one catagorie.

    many thanks!

  12. 209
    Fred

    Thanks for a great plugin! Trying to get the plugin to show an image along with the category title, but can’t get it to work. I use the Yet another photoblog and all my posts are YAPB posts.
    I tried adding this and the file complies, but nothing shows up on the page:

    The tag for inputing a thumbnail of the post's image is: 
    <?php yapb_thumbnail('<div>', array(), '</div>', array('w=200', 'q=90'), 'thumbnail'); ?>  
    
    So I tried:
    $the_output .= yapb_thumbnail('<div>', array(), '</div>', array('w=200', 'q=90'), 'thumbnail');

    Any ideas? Thanks!

  13. Version 1.8 Released

    - The plugin has been tested, and works, with WP 2.6
    - The code now uses WP’s current_time function (instead of relying on the server time) to hide future posts.
    - Added an option to exclude categories (comma-separated list of cat IDs to exclude).

  14. I will be going through all my plugins soon to check for 2.6 compatibility.

  15. 206
    Jay

    Hey All,

    I have been pulling my hair out to display more posts and have found a way to display more posts but its not specific just shows the latest 5 posts. If you change on V1.7 line 294 i = 0 to 3 it will display 5 most recent posts.

    Hope that helps some people

  16. 205
    hello

    Hi, I like to find out is it possible to display the script not within the template file. Instead, I like it to display in another directory, and not within my blog directory. Pls advice

  17. [Quote]
    2) In a template file, insert the following code:[/Quote]

    What do you mean by ‘template file’? is it folder, .txt, .php, indext.php, single.php and so on.

  18. How would one go about including the first one or two posts from each particular category in the site’s RSS feed?

  19. 202
    Abel

    Hi Admin,

    This plugin is exactly what my client needs. :)

    I’m trying to exclude a category using the tip of Jesse last 8-16-06 (code below) but it doesn’t seem to work anymore for Wordpress 2.5 .

    I’d appreciate any help. Thanks!

    
    -In the script, find this line:
      AND post_status = 'publish' 
    -Right above it, add this line:
      AND {$table_prefix}categories.cat_ID  3
      (Where 3 is the category ID) 
    

  20. Hi,

    I have:

    added an option to remove category from output
    remove duplicate posts
    fixed invalid html tags
    optimsed html / php /sql for speed

    If you want to download my updated version of the code (1.7mattc) goto: http://mattclegg.com/blog/wordpress/latest-post-from-each-category-plugin-17-mattc

    mattc

  21. sorry to post twice in a row, but here’s a fix for anyone not scared to modify the code. just search for any instance of:
    AND post_date < NOW()
    and replace it with
    AND post_date < ( NOW() + 86400 )
    this lets the script look ahead in the future up to a day from now, which would compensate for any time differences and let you post from your own time zone without issue.

  22. I’m also having the problem with a delay between posting and this script picking it up. I think I’ve found out what the problem is however and I have a workaround. I live on the east coast, but my site is hosted on a server on the west coast. If I set the timezone to UTC -8 then the posts show up immediately. I think the script must compare the current time on the server to see what is new, but it can’t see posts from a few hours ahead of the server’s current time so it ignores them. If this was changed somehow so that it recognized posts that were posted after the current time then no one would have this issue.

  23. Can u tell me how do i configure your script so that it will look like the same shown in http://www.revenews.com

    Please check and let me know

    Thank You in Advance

  24. 197
    huzeyd

    Hi, thanks for plugin but i have a problem, i want show more posts from all category but this plugin shows a posts from every category how can i do it or if it is possible can you write a mini code for it, please. Thanks…

  25. (Reposting because it seems I didn’t need to html-quote everything, please delete the preceding comment. Thanks.)

    This simple patch adds a new option, that switches off the ‘per category’ part and just shows all recent posts, using the same formatting etc. I know that kind of subverts the purpose of the plugin, but it was what I needed to do. ;-)

    
    Index: dd-lastest-from-each.php
    ===================================================================
    --- dd-lastest-from-each.php	(revision 532)
    +++ dd-lastest-from-each.php	(working copy)
    @@ -19,6 +19,7 @@
     add_option('ddle_date_format', 'F jS, Y');
     add_option('ddle_excerpts', FALSE);
     add_option('ddle_chars', 200);
    +add_option('ddle_all_posts', FALSE);
     add_option('ddle_comment_link', FALSE);
     add_option('ddle_comment_num', FALSE);
     add_option('ddle_comments_none', FALSE);
    @@ -49,6 +50,7 @@
     		update_option('ddle_date_format', 'F jS, Y');
     		update_option('ddle_excerpts', FALSE);
     		update_option('ddle_chars', 200);
    +		update_option('ddle_all_posts', FALSE);
     		update_option('ddle_comment_link', FALSE);
     		update_option('ddle_comment_num', FALSE);
     		update_option('ddle_comments_none', FALSE);
    @@ -67,6 +69,7 @@
     		update_option('ddle_date_format', (string) $_POST["ddle_date_format"]);
     		update_option('ddle_excerpts', (bool) $_POST["ddle_excerpts"]);
     		update_option('ddle_chars', (string) $_POST["ddle_chars"]);
    +		update_option('ddle_all_posts', (bool) $_POST["ddle_all_posts"]);
     		update_option('ddle_comment_link', (bool) $_POST["ddle_comment_link"]);
     		update_option('ddle_comment_num', (bool) $_POST["ddle_comment_num"]);
     		update_option('ddle_comments_none', (bool) $_POST["ddle_comments_none"]);
    @@ -178,6 +181,13 @@
     		(0 = unlimited)
     	</td></tr>
     
    +	<tr valign="top"><td width="35%" align="right">
    +              Include all posts
    +	</td><td align="left">
    +		<input type="checkbox" name="ddle_all_posts" value="checkbox" <?php if (get_option('ddle_all_posts')) echo "checked='checked'"; ?>/>
    +              <br/>(This option disables the 'from each category' part of the plugin.)
    +	</td></tr>
    +
     	
     	</table>
     	</fieldset>
    @@ -213,8 +223,8 @@
     	$ddle_comment_num = (bool)get_option('ddle_comment_num');
     	$ddle_comments_none = (bool)get_option('ddle_comments_none');
     	$ddle_limit = (int)get_option('ddle_limit');
    +        $ddle_all_posts = (bool)get_option('ddle_all_posts');
     
    -
     	$hide_check = '';
     	if ($ddle_hide_protected) {
     		$hide_check = " AND post_password = '' ";
    @@ -292,11 +302,15 @@
     		}
     
     
    +        if (!$ddle_all_posts) {
     
    -	$used_cats = array();;
    -	$i = 0;
    -	foreach ($last_posts as $posts) {
    +            /* scan through and remove all but the first post from each
    +               category, unless we're including all posts. */
     
    +            $used_cats = array();;
    +            $i = 0;
    +            foreach ($last_posts as $posts) {
    +
     		if (in_array($posts->cat_name, $used_cats)) {
     			unset($last_posts[$i]);
     		} else {
    @@ -304,7 +318,8 @@
     		}
     
     		$i++;
    -	}
    +            }
    +        }
     	$last_posts = array_values($last_posts);
     
     
    

  26. This simple patch adds a new option, that switches off the ‘per category’ part and just shows all recent posts, using the same formatting etc. I know that kind of subverts the purpose of the plugin, but it was what I needed to do. ;-)

    
    Index: dd-lastest-from-each.php
    ===================================================================
    --- dd-lastest-from-each.php	(revision 532)
    +++ dd-lastest-from-each.php	(working copy)
    @@ -19,6 +19,7 @@
     add_option('ddle_date_format', 'F jS, Y');
     add_option('ddle_excerpts', FALSE);
     add_option('ddle_chars', 200);
    +add_option('ddle_all_posts', FALSE);
     add_option('ddle_comment_link', FALSE);
     add_option('ddle_comment_num', FALSE);
     add_option('ddle_comments_none', FALSE);
    @@ -49,6 +50,7 @@
     		update_option('ddle_date_format', 'F jS, Y');
     		update_option('ddle_excerpts', FALSE);
     		update_option('ddle_chars', 200);
    +		update_option('ddle_all_posts', FALSE);
     		update_option('ddle_comment_link', FALSE);
     		update_option('ddle_comment_num', FALSE);
     		update_option('ddle_comments_none', FALSE);
    @@ -67,6 +69,7 @@
     		update_option('ddle_date_format', (string) $_POST["ddle_date_format"]);
     		update_option('ddle_excerpts', (bool) $_POST["ddle_excerpts"]);
     		update_option('ddle_chars', (string) $_POST["ddle_chars"]);
    +		update_option('ddle_all_posts', (bool) $_POST["ddle_all_posts"]);
     		update_option('ddle_comment_link', (bool) $_POST["ddle_comment_link"]);
     		update_option('ddle_comment_num', (bool) $_POST["ddle_comment_num"]);
     		update_option('ddle_comments_none', (bool) $_POST["ddle_comments_none"]);
    @@ -178,6 +181,13 @@
     		(0 = unlimited)
     	&lt;/td&gt;&lt;/tr&gt;
     
    +	&lt;tr valign="top"&gt;&lt;td width="35%" align="right"&gt;
    +              Include all posts
    +	&lt;/td&gt;&lt;td align="left"&gt;
    +		&lt;input type="checkbox" name="ddle_all_posts" value="checkbox" &lt;?php if (get_option('ddle_all_posts')) echo "checked='checked'"; ?&gt;/&gt;
    +              &lt;br/&gt;(This option disables the 'from each category' part of the plugin.)
    +	&lt;/td&gt;&lt;/tr&gt;
    +
     	
     	&lt;/table&gt;
     	&lt;/fieldset&gt;
    @@ -213,8 +223,8 @@
     	$ddle_comment_num = (bool)get_option('ddle_comment_num');
     	$ddle_comments_none = (bool)get_option('ddle_comments_none');
     	$ddle_limit = (int)get_option('ddle_limit');
    +        $ddle_all_posts = (bool)get_option('ddle_all_posts');
     
    -
     	$hide_check = '';
     	if ($ddle_hide_protected) {
     		$hide_check = " AND post_password = '' ";
    @@ -292,11 +302,15 @@
     		}
     
     
    +        if (!$ddle_all_posts) {
     
    -	$used_cats = array();;
    -	$i = 0;
    -	foreach ($last_posts as $posts) {
    +            /* scan through and remove all but the first post from each
    +               category, unless we're including all posts. */
     
    +            $used_cats = array();;
    +            $i = 0;
    +            foreach ($last_posts as $posts) {
    +
     		if (in_array($posts-&gt;cat_name, $used_cats)) {
     			unset($last_posts[$i]);
     		} else {
    @@ -304,7 +318,8 @@
     		}
     
     		$i++;
    -	}
    +            }
    +        }
     	$last_posts = array_values($last_posts);
     
    
    

  27. This is great thank you! I would also love to see images included in this, is there anyway we could do that?

    Thanks

  28. 193
    rob

    I don’t understand why you didn’t include the ability to limit the amount of posts shown, is there a way to do that?

  29. 192
    margot

    I was just wondering if there is any way to display an image within each of the posts? Thanks!

  30. 191
    Robert V

    How do i add a link at the end of the previews e.g. “Read More” link and then adding a

  31. 190
    bodhi mcgee

    Hi, great plugin. Loving it, making life easy. But one thing I was thinking was why it doesnt include the ability to have an image included from the post? Any chance of having this put in? Or as a quick fix, any ideas for a quick code fix to get this working? No matter what, great job and thanks very much. This will be the icing on the cake. Cheers

  32. Plugin is a good idea but there is something wrong with this application. It is displaying wrong posts.. not the latest ones… but older posts… am I the only one experiencing the problem?

  33. Ok, nice plugin but not updated at all i see,

    ————–
    If you want to disable any child categories, this is the correct line for WP 2.3.2:
    find: AND {$tp}terms.term_id = {$tp}term_taxonomy.term_id
    and place after it: AND {$tp}term_taxonomy.parent = 0

    if you want to show only child categories then you place:
    AND {$tp}term_taxonomy.parent > 0

  34. Thanks so much for the plugin! You’re the best, Aleister, so many useful plugins.

  35. 186
    ego2012

    hello,
    how can i exclude some category (i’d like to hide all parent cats)
    thank you! ;)

  36. Hi,
    first of all, thanks for this grate plugin. secondly it seems this is having some propagation delay between posting new content and being shown in your plugin, although the new post is immediately shown in side bar.

  37. 184
    Tom

    Hello again
    New day new problem :)
    Is there a way to add links to post text ?
    When i use Show first X characters of posts everything looks good but links aren’t displayed. sentence is excluded.
    best regards TOm

  38. 183
    Tom

    ok it’s easy i found it quickly despite my poor php knowlege :)
    just add
    AND {$tp}term_taxonomy.term_id = 3
    after
    AND {$tp}terms.term_id = {$tp}term_taxonomy.term_id

  39. 182
    Tom

    HEllo
    very nice plugin, great job!
    now question, how to display one category under wp2.3
    this solution AND {$table_prefix}categories.cat_ID 3
    won’t work

  40. 181
    ego2012

    hi guys,
    this is the plug-in i really nead in my home.php template thank you.

    i’ve some features request related to post with multiple category and category exclusion.

    i’ve posts with multiple cats maybe 2 or 3 like “Events, Free Conference, Workshops” and i’d like to show the most relevant post in “Events” and the coolest in “Workshops” now i’ve a single post repeated for all these cats cause it is the latest…(of course!:)

    maybe you can work side by side with “Top Cat” http://wordpress.org/extend/plugins/topcat/
    if i’ve correctly understood it functionality
    (english language is not my first talent ;)

    bye

  41. Super plugin was using it for the longest time but
    not sure what happened but ver 1.5 worked great I upgraded to 1.7 and now even though I have on the front page post at the bottom nothing is displaying.

    Any ideas on where to look ?
    best,
    Lewis

  42. excluding some categories option is need.

  43. 178
    Johan

    I like this plugin!

    I am looking for the following extension, as i will have a lot of categories.

    List the lastest n posts of a selectable list of categories
    - number of posts per cat (n)
    - which cats to show (list)

    a inspiration sample can be found at z.nu.nl

  44. i really like this plugin, and have used it for a long time. the 2.3.1 upgrade threw me for a loop for a little while, but after getting in and getting dirty, i finally have everything fixed back up. i keep getting this error:

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/0/d144193462/htdocs/texas-fire/wp-content/plugins/dd-latest-from-each.php:435) in /homepages/0/d144193462/htdocs/texas-fire/wp-includes/pluggable.php on line 391

    i have been all over the WP forums and done all of what the FAQ suggests to fix it (clean the whitespace, check for carrige return) but to no avail. any suggestions ?

  45. Good news, the delay is over, it now picked up the new post. Strange that it took a couple of hours, but at least it did it on its own.

    So just that other question left in case you have any thoughts on it, thanks again!

  46. Great plug-in, really nice. Two things:

    I just added a post, but the plug-in hasn’t noticed it — it is still showing the previous post in that Category as the recent one. I see that in Comment #63 someone else had a similar issue, which seemed to be fixed at that point, but something’s up again. Any thoughts?

    Second thing, much less pressing, well, just see my Comment #169 :)

    Thanks again for a great plug-in.

  47. Thanks for a great plugin, it works like a charm!

    A suggestion / request if such a thing is possible:

    - The option to hide or show the category name, so only the titles of the posts and their first words show up and are used as links to them; I’m going for a very minimalist navigation…

    Keep up the good work! Cheers.

  48. 173
    WordPress Lover

    Hi, heheh, it’s me again =P. For this plugin, I’m just wondering if you could add the [Author Name] and an Option to “Turn Author Names into links.”

    It’s also helpful to have another Option to check the Category we don’t want to display the post (like the Similar Post Plugin by rmarsh.com/plugins =). Please, please add this Option as this will make this plugin more powerful!

    *Hehe, here a sidenote: I plan to use this for an ezine articles site like ezinearticles.com, so the format for the display (which means I’ll hack your plugin =) is as follow:

    [Post Title] [By Author Name] [in Category Name] [on Date Format] [- Post Excerpt]
    //This format helps the flow = ‘make sense’ (e.g. Option to not show [on Date Format]: [Post Title] [By Author Name] [in Category Name][ - Post Excerpt].

    //Your current display format: [Category][Post Title - ][Date][Excerpt].

    Hope I make some sense/sensible suggestions xP. O.K. See you later D[r]agonDesign.

  49. 172
    Jon Bennett

    Is there a way to only show 1 particular categories’ latest posts?

  50. Very helpful plugin!
    But why is it not working, when I’m inserting it into the text widget?
    Thank you!

  51. Version 1.7 Released

    This update adds support for WordPress 2.3, and will also still work in 2.1 and 2.0.

  52. I see that you can limit the list to a certain number of categories, but is it possible to limit the output to a particular set of categories? E.g., if I only and always want it to shows categories 1, 4, 5, and 7, is that possible?

  53. Is there an easy way to mod this so you can have it be Latest post from a certain category?

  54. Hello,

    People that view my blog with IE 6 are having a problem. The plugin is displaying the list all the way at the bottom of the page.

    anyone else having this issue or know of a fix.

  55. Very nice.
    How do I add the last posts to the plugin?

    thanks for your hard work.

  56. 165
    Sal

    Thanks for providing this. Very useful. :) I’d like to use it on different pages of a site to only show one different category per site page, rather than list all categories. Is this possible?

  57. 164
    Jono2009

    Great work on the plugin, thank you! Is it possible to have it display the last {x} articles from each category as well?

    Thx!
    Jon

  58. 163
    monti

    How to sort names of categories in alphabetical order of wp admin panel-manage categories

  59. 162
    FraZ

    Hi
    great plugin, it’s working fine on my site.
    I suggest to give administrators the possibility to exclude some category i.e. i want to show all cats except that with id 3,8 and 11.
    bye

  60. Viceer: You just have to enable the option to show an excerpt for each post.

  61. Hi, I am new with WP and planning to use it in our Uni. Your plugin it just the right one we’ve been looking for.

    How can i possibly use the options… (sorry, i am new with WP)? I like to show the latest post for each category with some few lines in every post. Like:

    Category #1
    =======

    POST TITLE
    date posted

    Some few lines of the post.

    Another Category
    ===========

    POST TITLE
    date posted

    Some few lines of the post.

    Help/Suggestion is much appreciated..

  62. Hello,

    I really love this plugin, it works exactly as i wanted it to.
    but there is one very small problem, I want my main page to display the entire posts. but the format does not seem to follow the template, they crumple up and lose all the format

    here’s my website http://www.sheeply.com
    the 1st post is by the plugin, the second post is the original post. Is there anything i can do so that it adds the and other formats into the plugin generated posts so that it looks like the second (the original) post?

    Thank you very much!

  63. 158
    abu

    Great plugin, thanks
    Is it possible to show post-contents including the post-image and the text limited to the [ more...] quicktag?
    I’ll appreciated if anybody have a clue.
    Thanks

  64. Hey,

    Great plugin, exactly what i was looking for. I was just wondering if i could add a line before each category (after the content is displayed.) I’m kind of new to the coding thing and was hoping you could tell me what to modify in the plugin code.

    Thanks

  65. rdentry: It sometimes takes a little while before the new posts appear due to the way the plugin checks for future-dated posts.

  66. Huh, weird… the two parameters should be

    title_li=&depth=1&sort_column=menu_order

    and

    title_li=&depth=1&sort_column=menu_order&exclude=1466

    where the number corresponds to the ‘latest’ page.

  67. Update: I’ve done that now, by editing header.php

    <?php wp_list_pages('title_li=&depth=1&sort_comVVU&FW"r

    becomes:

    
    <?php if (function_exists('dd_last_from_each')) {
          wp_list_pages('title_li=&depth=1&sort_column=menu_order');
           } 
      else {
             wp_list_pages('title_li=&depth=1&sort_column=menu_order&excmVFSCcbrТУ

  68. Thanks for the nice plugin, here’s what I’ve done with it.

    1) I made a new page, ID number 1466, containing the following text:

    “This page displays the latest post along in every category on this site.

    If you’re reading this, either the plugin is disabled (maybe I am mid-upgrade), or I’ve simply messed up! If so, please let me know using the form below!”

    2) I updated the ‘page’ template

    				<?php if (have_posts()) : ?>
    				<?php while (have_posts()) : the_post(); ?> <!-- These two lines were existing code, for context -->
    <?php if (($post->ID==1466) and (function_exists('dd_last_from_each'))) : 
    echo dd_last_from_each(); 
    ?> 
    				<?php else : ?>

    and, before endwhile <?php endif; ?>

    3) Now, if the plugin isn’t available, the page will display an apology, and if it is available it’ll show the plugin results.

    4) My final step will be to hack the page links to not show the link to the page if the plugin is unavailable.

    Thanks.

  69. 152
    rdentry

    This plug-in is working wonderfully except for the fact that when I test it, by writing a new post, it does not show the most recent test post after I publish and refresh. I believe that others have had this problem, but the solution has been exchanged via email. Any help would be appreciated.

  70. Amber: Because of the way this plugin checks the post dates, new ones do not always show up instantly.

    Marc: Thanks, I will make the modifications.

  71. I added new post in several categories, but the output for the plugin remained the same. What do I need to do?

  72. Hi,

    I appreciate and I utilize your plugin on my site. I have just 2 comments:

    * around line 64 of the last version (1.5)

    replace
    Latest Posts From Each Category v1.4

    with
    <h2>Latest Posts From Each Category v1.5</h2>

    * it will be nice for non-english speaking people to change around line 302 the date function with the date_i18n()function to display a localized date format accordingly with the $WPLANG variable

    replace
    $the_output .= ' - ' . date($ddle_date_format, strtotime($posts->post_date));

    with
    $the_output .= ' - ' . date_i18n($ddle_date_format, strtotime($posts->post_date));

    regards
    marc

  73. asuan: Thanks, I will add a link to it.

  74. With your permission i traslated your plugin to spanish. Thanks for all.
    The link: http://www.asuan-peluqueros.com/dd-lastest-from-each-SP.txt

  75. Damon: It is - just search the WordPress docs to find out how to get the ID of the page being viewed. Then you can just have a simple if statement that checks it.

  76. 145
    Damon

    Oops, the code won’t show properly. Ok, I used the info I found on this link:

    http://latestpost.pastebin.co.uk/3890

    Now I want to add a conditional statement that will run the code only if on a specific page. Is that relatively easy to do?

  77. 144
    Damon

    Ok I think I found the answer to my own problem, however now I have a new question. Here’s the code I found and modified:

    Events

    > -

    (Note: The ‘a’ href is shown that way because the code breaks when I post it here)

    That’s great except that info shows up on every page in the
    sidebar. I’d like to add a conditional statement that runs the code above in the sidebar only if on a specified page, i.e.

    then,

    the above code would work…

    is that possible?

  78. 143
    Damon

    Gahhhh! This is the plug-in I’ve been looking far and wide for! I only need one modification.

    I want to display 3 posts total. From a specified category.

    Is it possible?

  79. Kons: No. You are looking for an RSS aggregator plugin.

  80. i would like to use this plugin on a different way. i want to show latest posts from another blog, is is possible with your plugin?

  81. I commented out the part of your plugin that introduced a linebreak after the separating dash, still curious if you might ever include options for formatting the output…

  82. 139
    ovizii

    how would I change the plugin so that it does not insert a breakline after a separating “-” ? have a look here in the right sidebar: http://www.klub-kamikaze.com/ after every title there is a “-” and then a newline and very often the dash is on a line by itself… I woudl like to take out the linebreak after the dash, can I simply edit the plugin? do you have any plans for letting users edit the layout in the options page rather than editing the plugin?

  83. mookie: That code should work - what was the error?

  84. i was curious about hiding child categories. i searched the comments and found this by Jess:

    You can hide child categories by:

    -In the script, find this line (on or about line 233):
    AND post_status = ‘publish’
    -Right ABOVE it, add this line:
    AND {$table_prefix}categories.category_parent = 0

    but that returns a db error. any sugg?

  85. hi, i would like to display not just recent post on each category, but a number of recent posts in each category, how to do that?

  86. Great plugin, exactly what I’ve been looking for. It really helped me. How i can change it to show only comments to posts ?

  87. Eduardo: Sure, look in the script for the declaration of ‘$sort_code’ - you could add in your own SQL code to sort it however you like.

    syokaku: That would be possible, but it would be much easier to just use a few lines of code to do it, instead of this plugin. Example: http://wordpress.org/support/topic/108402

  88. 133
    Eduardo

    Is there any way I could sort the categories in any other way than Alphabetical or Post Date?

    My categories are an Anagram and are supposed to Read VALUE so those options don’t work for me.

    Everything else works great and is what I need for my site.

  89. Hi, great plugin!
    I’m trying to edit it to fit my needs: I want show only the last post of each category of my blog. I’ve onlytwo categories, so I’ll always have only 2 post in home page, but I’d like to put between the two post a menu. is it possible?
    thanks in advance

  90. Andre: It just generates a regular list, so you would just have to modify your CSS file.

    Mixa: It sounds like you might be better off with another plugin, but I do not know of one off-hand.

  91. But as to do, that did plugin show, say, the last 10 records only of certain category?
    Is it possible to load to multiply plagin then once or twice, naming him other names and to create a show for every page of the categories?
    Possibly, is there some other plugin, that allows to show the last records of the chosen categories in different places? (On every page - separate, chosen by hand, category)

  92. Hi,

    Is there any way to remove the big dot from infront of the listings?

  93. [...] parameters from the admin panel and style as you wish with css. heres a link to the plugin, Latest Post from each Category plugin for WordPress · Dagon Design [...]

  94. 127
    Kaleb

    Is it possible to add the option to exclude a specific category? I put posts I want to show up on the home page in a specific category (blog), as well as putting them in the category they belong (ex: News). So some posts are showing up in the list twice.

  95. Ash: I just uploaded version 1.4 which should fix that problem - thanks for pointing it out - I had not noticed it :)

  96. Great plugin, exactly what I’ve been looking for. Just one problem with wordpress 2.1, new pages are shown in the default category, is there a way to change this?

  97. My apologies. I didnt see your previous response to Victro.

  98. Hi there… this would be great if you could add the option to show more than one post/category. Like, to show a list of the most recent posts from each category.

  99. Victro: This plugin was not really made to do that. It is possible of course, but it would take a good number of changes. If you are interested in having a custom version of this plugin created, contact me.

  100. 121
    Victro

    How can i display the 3 latests post for each category instead of showing just 1?

  101. Hey, I use your script at my site: http://www.makenosense.net. But when I post a new post and assign it to a category the listing of latest post from each category won’t change.

    I found out that I need to post the “<!-- ddlastfromeach -->” inside the post, then save. And then edit it again and delete “<!-- ddlastfromeach -->” for the listing of latest posts to change.

  102. Hey, I use your script at my site: http://www.makenosense.net. But when I post a new post and assign it to a category the listing of latest post from each category won’t change.

    I found out that I need to post the “” inside the post, then save. And then edit it again and delete “” for the listing of latest posts to change.

  103. I am having the same problem as below. How can this be fixed so I can see the latest post.
    “hi

    but the plugin shows the last posts or the oldest ones?

    in our blog it shows the old ones. (???)

    is it correct?
    thnx
    http://www.markettari.biz

  104. Perhaps I will set up a section in the forum where people can post their modifications to scripts.

  105. 116