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.7   Updated Sunday, February 22nd, 2009 at 1:13pm

Posts by Author Plugin for WordPress

This plugin will show the last X posts by the current author either at the bottom of every post, or where you manually specify in each post. Using the built-in options page, you can choose the number of posts to show, set the header text, choose to show the post dates, select the format of the date, and choose whether or not to include the current post in the list. Other options have been added since the first release.

Download

  If you have found this page useful, please consider donating. Thanks!

Instructions

  • 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 DDPostsByAuthor).
  • Test it out by viewing a post.

Change Log

  • 02-22-09 Version 1.7 – Added option to exclude selected categories from showing the post list (previous option was just to exclude posts in cats from being shown in the list – not where the list itself would show).
  • 09-26-07 Version 1.6 – Updated for WordPress 2.3. ‘Load Default Options’ button added. Fixed bug where pages would sometimes be listed.
  • 05-16-07 Version 1.5 – Updated for WordPress 2.2.
  • 05-22-06 Version 1.4 – The author’s ‘display name’ is now shown instead of their login name. Also, future-dated posts no longer show up in the lists.
  • 05-21-06 Version 1.3 – A bug was fixed where posts would show up multiple times if they were in multiple categories.
  • 04-19-06 Version 1.2 – Option added to sort posts by date – newest or oldest first. I have also added support for category exclusion. So posts from specified categories will not show up in the recent post lists. A bug was also fixed where the list would also include pages and attachments. It now just shows published posts.
  • 04-05-06 Version 1.1 – Comments bug fixed – they will now work properly when this plugin is enabled. Added option to enable/disable post list on every page. You can also now call the plugin manually in a post. A few other fixes as well, including a new option to include the current post in the list.
  • 03-30-06 Version 1.0 – First release.

Options

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

Show at the bottom of every post

If enabled, this plugin will generate its data at the bottom of every post, before the comments section.

NOTICE: No matter what you have this set to, you can also manually call this plugin by entering the following line where you want the data to be shown in your post:

<!-- ddpostsbyauthor -->

Number of posts to show by author

This is the number of posts by the current author that will be shown at the bottom of each post.

Text to show before list

This is the header for the post list. If you want to use the author’s name in this text, use %A.

Category IDs to exclude from post lists

This is a comma-separated list of categories IDs you want to exclude from the recent post lists (this option does not prevent the list from being shown on posts in those categories, but rather just the useage of categories in the list – see the option below for that).

Category IDs to not display list on

This is a comma-separated list of categories IDs for categories that you do not want the post list to display on (when using the option to show it on every post).

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)

Include current post in list

This sets whether or not the post being viewed should show up in the list of recent posts by the current author.

Show newest posts first

If checked, this will show the newest posts first in the list. If not checked, it will show the oldest posts first.

  1. I’m using your plugin and everything has been working great until I upgraded to WordPress 3.0.1. I’m now getting the author name showing at the beginning of all my posts where I have your plugin active.

    Not sure if this is a but or not but was wondering if there was going to be an update to support the latest WordPress version?

  2. 148
    ercan

    can we use this plugin by drop down menu list? That is; instead of showing posts by list can we show posts in drop down menu? Thanks.

  3. Recently i wrote a Review Post on this plugin, this is really very helpful plugin. Thanks for this great work.

  4. Hi there!

    Love this plugin. I have ONE small problem. I use %A and it does not return anything. Thoughts?
    Thanks and Cheers,
    Gil

  5. 145
    Ami

    I have a single-gallery.php page template which will only show posts added by the post type “gallery” but I would like the list of recent posts not to be shown in this template.

    Is there away to exclude the recent posts being listed on this page?

  6. Thanks for the plug-in! That is what I was looking for…
    No troubles with the installation and use… It is quite a simple plug-in written with a simple code…
    Keep it UP!

  7. We supply all kinds of moncler boots,moncler bags,moncler coats,moncler jackets,moncler T-shirt,moncler vest and so on.We have got a good reputation pf our products with top quality and good price.We sincerely look forward to futher cooperation with you for mutual benefits.We are sure that you will find working with us is a pleasant, time-saving and profitable experience. Please feel free to contact us if you have any questions.Our website is http://www.newlyapparel.com.

  8. 142
    david

    Is there a way to show the full post and images ?

  9. Thanks a ton!!! This is really great. We’re using your code to build some sweet customizations into our blog.

  10. 140
    contact

    Hi,

    Your plugin is excellent. But i have a little problem.

    On my page: ” about me”, i would like it appears all autors on this page (with their 5 articles).

    When i use: Show at the bottom of every post , it’s ok.

    but on my section “about me”, only me appears (because i wrote article” !!!!

    could you help me ?

  11. Is this meant to work with Wordpress 2.9? I’ve tried calling it with the plug-in options, within posts and via php in the template but no go …

  12. Looks awesome. I’ve looked at some other options for this, but this looks pretty simple to implement. Using 2.9.1, so will see how it goes.

  13. Awesome – works perfectly – saved me a lot of time!!! Thank you so much.

    Are you interested in developing a custom plugin for payment?

  14. 136
    Jamie

    Is it possible to get this plugin to list an author’s post but group by category?

    Category
    - Title
    - Title

    Category 2
    - Title
    - Title

    And so on?

  15. Hi there,
    Thank you this great plugin for WordPress I have installed and its working terrific :) . But I have an issue: Since my template is calling most of the widgets directly by code.(calling the proper php class) I’m not able to put this one between two other widgets. Is there Any way to call the widget directly from the template?

    Such as:
    echo dd-posts-by-author;

    Thank you :)

  16. 134
    Willy

    Here is a way to obtain author profile and ID outside the loop.
    http://www.dbuggr.com/milly/obtain-author-id-author-profile-wordpress-loop/

  17. 133
    Michael

    The plugin worked great for a week or so. A few posts were added after the plugin was installed but today my new post did not display. What could be the problem?

  18. like Bfri, this plugin is no longer working no matter what I do. echo, regular, at bottom, not at bottom, inside loop, outside loop, the links are just not showing up. what am i doing wrong? what can i do to fix this problem? is it my .htaccess file? it stopped working after I moved the blog to another folder on my site. help would be greatly appreciated.

  19. 131
    Joseph Murphy

    Works like an absolute treat, took the text, popped it into a blank php file, saved and uploaded it, activated and it worked STRAIGHT AWAY!!

    Thank you soooooo much :)

  20. 130
    Agatha

    Oh, now it’s okkk!! =D

  21. Where I put in function.php? When I put it in the finish of the page, occur an error! =/

    Thanks!

  22. Does the plugin work for anybody on WordPress 2.8.5? It doesn’t show any posts for me no matter if I use ‘echo ddpa_show_posts();’ in single.php or turn ‘Show at the bottom of every post’ on.

    It did work without problems in previous WordPress versions.

  23. This plugin has been tested, and works, in the latest release of WordPress – 2.8

    Josh: Assuming you are using a recent version of WP, replace the last instances of this line in the script:

    {$exclude_check}

    With this:

     AND ( {$tp}term_taxonomy.term_id == 10 
    OR {$tp}term_taxonomy.term_id == 20 
    OR {$tp}term_taxonomy.term_id == 30 )

    Where 10, 20, and 30 are the categories you want to include, etc..

    Alan: Should be. Just modify this line so it assigns the user ID of the logged in user:

    $c_author_id = $post->post_author;

    I do not recall the variable for it off hand, but it is in the WP documentation.

    Others

    The plugin will not work outside the loop, because the ID of the current author only exists within the loop. Outside the loop, WP does not ‘know’ who the author of the page being viewed is. There are methods to allow this to happen, but the plugin does not currently support this feature.

  24. Is there a way I can modify the plugin so that it only lists posts from specified categories? The opposite of the exclude categories feature.

  25. 125
    Alan

    Hi,

    Is it possible to alter the plugin so it displays the latest posts from the currently logged in user?

    I would like to add this to my sidebar.

    Thanks!!

  26. 124
    Jenny

    Hi,

    How do I rename the text file as php, please?

  27. Would be great but to use outside the loop…

  28. 122
    pranoy sinha

    Great plugin.. very useful one.. works great in my wordpress site version 2.7.1. But i want it to show in sidebar and with the author image with the existing feature as well. Can you pls help me..

  29. bug: it doesn’t show the last new post…using wp 2.7

    great concept…loved it!

  30. I’m using this plugin for our blog
    thanks for incredible support.

    ~cheers

  31. 119
    Eses

    Fatal error: Cannot redeclare ddpa_add_option_pages() (previously declared in /home/xxx/public_html/wp-content/plugins/dd-posts-by-author.php:26) in /home/xxx/public_html/wp-content/plugins/dd-posts-by-author.php

    Help pls.

  32. 118
    Matt

    Sorry about that comment. It just isn’t showing on the index page so it IS working.

    Thanks!

  33. 117
    Matt

    I’ve added this plugin to 2.7.1 but it’s not appearing below the posts, nor at all. It is enabled and checked off to show on all posts.

    I may need to hardcode it in the index page. Any help?

  34. I searched for a plugin which shows the author name on the post page but this plugin is even better. Thanks for that.

    Since I use also a similar posts plugin and wanted to show other author’s posts below I had to turn “Show at the bottom of every post” off and did include it in my single.php template:

    
    <!-- START: show last posts from author -->
    <?php echo ddpa_show_posts(); ?>
    <!-- END: show last posts from author -->
    

  35. Sorry about that last comment, I figured out that the issue was my own. It was a CSS styling problem that only revealed itself once using your plugin.

    Sorry again.

  36. Great plugin and I am currently using it as part of a website I am currently developing.

    I have modified the plugin so that it displays the excerpt from the posts rather than the name, but it works the same none the less.

    One question though:

    Is there some type of built in Cache for this plugin? The reason I ask is that I made a bunch of test posts today and they are still not showing up in the listing. I have the number of posts to show set at 10 but it is still only showing 2 posts. This is happening regardless of if I use the original plugin files or the one I modified.

    Ive played with all relevant plugin settings but have come up with nothing. Ive even tried de-activating it but that does nothing as well.

    Any ideas?

  37. Hi, how can I put the post-by-author’s list in the file index.php? I’ve to place the list out of the loop.

  38. Version 1.7 Released

    This version has been tested in the latest release of WordPress (2.7.1)

    Several people commented that the category exclusion feature was not working. It was, but not in the way some people may have intended.

    The category exclusion option simply prevented posts in particular categories from being added to the list of posts by author. It did not effect *where* the list would be shown.

    A new option has been added so that you can also exclude certain category IDs from showing the list at all. Enjoy!

  39. Hi, great plugin, been using it for a while now but also having problems excluding categories within the settings. Please help :-)

  40. I am also having the problem with excluding categories within the settings. This is a nice plugin that I really hope it will get fixed for the latest Wordpress version!

  41. This plugin is great; it works fine on my 2.7 Wordpress.

    I would like to be able to put a graphic divider between the content of the post and the “Other posts by %A” part of the plugin. I tried inserting the code in the Single.php, but it always showed up after the plugin text. Where in the plugin can I put the simple HTML code for the graphic so it will show up where I want it?

    Thanks

  42. Thank you.

  43. This plugin refuses to work within my site WP2.6.1. Tried different solutions but no luck.

  44. Great plugin. I saw how to use it in the sidebar but is there anyway to use it with a blog that has multiple authors?

  45. Very useful plugin for multi-author blog. I installed it on WP ver 2.6 and it works great.

    Is is possible to also extend this plugin to provide a widget to show Author names and corresponding posts by each author. Also author name will hyperlink to all posts by that author. Customization options could be to sort by name or by number of posts, to show only authors with more than one post etc.

    Authors:
    name1 (#)
    name2 (#)

    Looking forward to this widget.

  46. Loved the idea of this plugin. sadly i cannot get it 2 work. using wordpress 2.6.1 might have something to do with it. suks =( Im stuck! please update / fix this plugin

  47. that plugin looks to be exactly what I’m looking for, thnx.
    I’ve got an idea. This option and should be filtering authors’ post numbers. Show display only authors up to 2, 3, 4 or 5 posts

  48. I installed it on my WP 2.5.1 but it didn't automatically show the info at the bottom of every post, even though I have had chosen that in the setting. How can that be fixed?

  49. I installed it on my WP 2.5.1 but it didn’t automatically show the info at the bottom of every post, even though I have had chosen that in the setting. How can that be fixed?

  50. Max,

    I modified the ddpa_show_posts function a bit to allow posts by author outside the loop. Take a look at my site to see what I mean, it’s on the right hand side under each author. If you’d like I can email you the chances I made.

    Note that I don’t use dates or anything like that, which did make it easier.

  51. Sorry forgot the code tags. I’m using the following code on the author template page:

    <!-- The Loop -->
    <?php echo ddpa_show_posts(); ?>
    <!-- End Loop -->

  52. Hello, thankyou for this great plugin! Just discovered your site and I look forward to checking things out :)

    I’m having the same problem as Corey… categories are still being included regardless of what I enter in options. It might be handy to know that I am using the plugin to list posts on the author template page only (and not on the actual post pages) using:

    Also, page navigation does not work with the plugin. So I have to enter 100 posts as the max number of posts to display (for now) … Is there a way we can use page navigation?

    Thanks for your time.

  53. Thanks for the pluggin. It works ALMOST as expected.

    For some reason, excluding a particular category doesn’t work for me. All other settings work fine, but when I put the ID number of a category I want to exclude from an author’s recent posts, all posts by that author still show up.

    Also, since can be added to individual posts, one thing that would come in very handy is a button that inserts that code automatically in the tiny editor. That way users wouldn’t have to look up the code and copy it every time they wanted to use it. They wouldn’t even have to switch to code view. Just an idea for future releases.

  54. 96
    Josef

    Yes , Max i have tried to find it but no result. You can do that via MT ( Movable Type ) but i like more WP . Lets dearch over the net and please let me know if you find any info ….

    Regards
    Josef

  55. I’d really like to see a way to use this OUTSIDE the loop, as I want to have a short menu in my sidebar with a list of authors and their respective latest entry. I haven’t been able to find any other plugin that even comes close…

  56. 94
    Josef

    Hello guys !
    I like this plug-in and works very good . I want to ask all of you if you know any plug-ins that can add an extra field to the write post function and to will able to add different name for the post writers . Am running a news magazine website and peoples sending us there articles and are just 2 who manage the whole website.

    I will be more than happy for any tips and advice.

    Kind regards
    Josef

  57. hello! I cant get the plugin to work.. I have done what it said, changed the name and activated the plugin. But no names is showing at the end of my posts..
    Is there anything else i have to do?

    please answer by mail..
    Regards Emma

  58. Ok, now I feel dumb. I suppose I should’ve tried the plugin before I commented. It appears as though it does, in fact, work outside the loop for me. I don’t know if it makes a difference, but I’m using a different sidebar specifically for my single article page. I used this code…

    <?php echo ddpa_show_posts(); ?>

    It works perfectly. Thanks!

  59. Hello,

    This plugin looks to be exactly what I’m looking for, except… Is it at all possible to use this OUTSIDE the loop? And I mean in ANY way possible ie. multiple loops etc. I can’t seem to get this to work on my own (without this plugin) but this looks to be my saving grace. See, what I’d like to do is put current author information in my sidebar. Grabbing things like description and email and whatnot works just fine, but getting a list of recent posts has been a nightmare. Any advice would be greatly appreciated.

    Thanks,
    Tyler

  60. 90
    Taurin

    I’ve just found the answer… maybe someone would like to know….

    Kind regards

  61. 89
    Taurin

    Hello, good job with this plugin. I want the link all post by an author on the index.php. Can you tell me, how to do that using your plugin? is just to show the Author, but I’d like to include something like <a href=”">

    Best Regards, MARY XMAS!

  62. 88
    Heiko

    Hi – - first…nice and helpful plugin…

    one question – it is possible to show the date before the permalink? is there any chance?

    Greets

  63. 87
    Jörg

    Could this plugin be tweaked to list recent posts of a specific author on a page instead of in a post?

  64. Cool little plugin. Thanks!

  65. Adil: I have updated a lot of my plugins, but not all yet. I am finishing them up though.

    Btw, unless one of my plugins specifically says it works in WP 2.3, it may or may not. As I update them, I am adding info on exactly what versions they work in.

  66. 84
    Adil

    This plugin will also blow up under WP 2.3 “Other Posts from Cat” by Aleister (http://www.dagondesign.com/). It took me two hours to troubleshoot this!!!

  67. Wonderful! Thank you!

  68. Version 1.6 Released

    The latest version of this plugin adds support for WordPress 2.3

    A ‘Load Default Options’ button was also added, and a bug fixed where pages would show up in the list.

  69. Will you be updating so that this plugin works with 2.3?

    I use it on a number of blogs I run and right now it gives a database error.

    Thanks

  70. 80
    imendes

    UPDATE: offline it works. Maybe some php configuration?

  71. 79
    imendes

    Sorry about all that posts. My mistake.

  72. 78
    imendes

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND wp_posts.ID = wp_post2cat.post_id AND ID != AND post_status = 'publ' at line 5]
    SELECT ID, post_title, post_date, post_category FROM wp_posts, wp_post2cat WHERE post_author = AND wp_posts.ID = wp_post2cat.post_id AND ID != AND post_status = 'publish' AND post_date < NOW() GROUP BY ID ORDER BY post_date DESC LIMIT 5 
    
    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 4]
    SELECT display_name FROM wp_users WHERE ID = LIMIT 1 
    
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/prjglb/public_html/angolanainternet-ao/inv_cientifica/wp-includes/wp-db.php:121) in /home/prjglb/public_html/angolanainternet-ao/inv_cientifica/wp-includes/pluggable.php on line 275

  73. 77
    imendes

    AND post_date

  74. 76
    imendes

    Hi, I’m having some problems with this plugin. If I activate the plugin I get errors when I create a new post. When I press the button ‘Publish’ I get the following errors:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND wp_posts.ID = wp_post2cat.post_id AND ID != AND post_status = 'publ' at line 5]
    SELECT ID, post_title, post_date, post_category FROM wp_posts, wp_post2cat WHERE post_author = AND wp_posts.ID = wp_post2cat.post_id AND ID != AND post_status = ‘publish’ AND post_date

  75. Is there a way to display posts by passing it the author id? I want to display posts on author bio pages, so it is outside of the wp loop.

    Thanks!

  76. Good plugin, but it includes pages within its listing, not just the posts. If you don’t want the pages to show up (like your about page, or your contact page or any other page you create), then simply add AND post_type = ‘post’ within the codes implementation where the SQL query is written.

  77. Google Tutor: You can try using the following code directly in your single.php file – just make sure you add it somewhere in the loop:

    <?php echo ddpa_show_posts(); ?>

  78. how can I control where this is output onto single.php? I want to put some share icons before the links and can’t figure out how…

  79. Travis: Check your email :)

  80. Awesome plugin! It is exactly what I have been looking for! Now I might get a swift kick to the nuts for this but… I just have a syntax question. I am creating a photoblog and want to include the thumbnail images in the “last X posts” lists. With the plugin I am using for the images, the code I use to get a thumbnail in the loop is:

    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">					
    <?php if ($post->image): ?>
    <img src="<?php echo $post->image->getThumbnailHref(array('w=100','h=100','q=95','wp=100','hl=100','zc=1')) ?>" alt="<?php the_title() ?>" title="<?php the_title() ?>"  />
    <?php endif ?>
    </a>

    Now what I want to do is have that included in the output section of your plugins code, which I am guessing by looking at the code is:

    
    	if (count($last_posts) > 0) {
    
    		$the_output = NULL;
    
    		$the_output .= $ddpa_header;
    
    		$the_output .= "<ul>";
    
    		foreach ($last_posts as $lpost) {
    
    			$the_output .= '<li><a href="' . get_permalink($lpost->ID) . '">' . $lpost->post_title . '</a>';
    
    			if ($ddpa_show_date) {
    				$the_output .= ' - ' . date($ddpa_date_format, strtotime($lpost->post_date));
    			}
    		
    			$the_output .= '</li>';
    
    		}
    
    		$the_output .= "</ul>";
    
    	}
    
    	return $the_output;
    
    }
    

    Now the problem is, that I don’t know PHP syntax. Can somebody throw me a bone here? Thanks in advance. Once again, Awesome plugin!

  81. Hi!

    Is there any way for pages to be excluded from the listing of recent posts at the bottom of each post? I have only posted one entry to the blog, but have created numerous pages. Those pages are showing up at the bottom of the one post as recent posts. Is there a way to get rid of them?

    Thanks,
    Celia

    Note: http://www.pinkchairdiaries.com is a site not intended for individuals under the age of 18.

  82. daniele: It should not be showing them, since this is in the SQL: ‘AND post_date < NOW()’

    Unless it is still showing posts that are only a few hours in the future, in which case it could have to do with the time setting in WordPress matching up with your server’s time.

  83. Hi,

    I have the future-dated posts shown in the recent posts menu. Is it possible to get the future-dated posts not shown in the sidebar?
    Thanks for helping.

  84. Rod: Perhaps in the future. Currently this plugin generates a list of posts from the author of the current post, so it has to run inside the loop.

  85. Like some of your plugins (which are all great, incredible) : the possibility to have an option to put the result non only inside the post :(

  86. Jim: Find this line:

    $ddpa_header = str_replace('%A', $author_info->display_name, $ddpa_header);

    And after it, add this:

    get_author_profile($c_author_id);
    
    $ddpa_header = str_replace('%FN', author_profile('firstname', false), $ddpa_header);
    
    $ddpa_header = str_replace('%LN', author_profile('lastname', false), $ddpa_header);
    

    Then use %FN and %FL for first and last.

  87. 63
    Jim Kimmons

    Ref my previous comment, I got the posts to show up by using ddAddSig and placing as the sig. Works great. However, instead of using %A in the ddpostsbyauthor plugin, how would I get first and last name to show instead of the author nickname? Tried %FIRST, %F, etc.

  88. I’ve used the plugin before and it was fine. New blog using Anaconda theme. Installed the plugin and activated. I’ve played with all the settings, but nothing shows at the bottom of the posts for admin or a test author. Test site above.

  89. 61
    Cent

    Hi Admin. After much trial and error, I actually got some workable code going. Had to create a Page which runs some PHP code. Thanks. Took a look at your other plugin for a different purpose and ran into a wall. I’ve posted on that forum about it.

  90. [...] posts by author – at the end of a story? | [...]

  91. Cent: This plugin does not really work like that. It generates the information based on the author of the current post/page being viewed. It sounds like you just need a bit of custom code to generate the lists.

  92. 58
    Cent

    Hi. This plug seems like I’m half way to my goal. What I want to do is set up a page that:

    Finds all of the authors and shows their name plus 5 of their last posts. Kind of like a summary page of all of the authors on the site. If there are no entries for a particular author, then it should skip them.

    How would I use this plugin in some type of author loop?

    I have WP 2.1.

    Thanks

  93. 57
    antisptc

    thanks its working God bless you:)

  94. antisptc: There is already a way to add it to your template file directly. See comment 43.

  95. 55
    antisptc

    yes im stick in index.php file oh sorry but i think its recommended can i request this feature?

  96. antisptc: Manual placement requires that you add the trigger text in a post or page – not a template file. Is this what you are doing?

  97. 53
    antisptc

    can you help me please?

  98. 52
    antisptc

    thanks its ok when show every page clicked but doesnt work with manual placement :////// my wp version 2.1

  99. antisptc: Near the bottom of this plugin, find this line:

    if (is_single()) {

    and change it to this:

    if (is_single() || is_home()) {

  100. 50
    antisptc

    can i show last 3 post in homepage i tried but doesnt show, how can i

  101. altugfatih: This is a WordPress plugin – it has to be used in WordPress.

  102. Thanks from Turkey.

    I want run plugin in a different file, not in wordpress

    Example:
    I uploaded allpostlists.php to server
    I want run in (http://arastiralim.com/allpostlists.php)

  103. altugfatih: Are you sure the plugin is enabled? You might want to try re-downloading it. Be sure to upload it to your server in ASCII mode.

  104. Fatal error: Call to undefined function: ddpa_show_posts()

    please help

  105. 45
    Jesse

    I see we can already exclude certain categories from this plug-in , but how about being able to narrow to just one topic. Would this be a worth while feature, or have I over looked that.

    Jesse

  106. 44
    Richard

    Thanks, Admin! You’re awesome.

  107. Richard: Add this somewhere in your sidebar file:

    <?php echo ddpa_show_posts(); ?>

  108. 42
    Richard

    Hi Admin!
    Great plugin. Would it be possible to throw the list into another part of the page, for example, in a sidebar? I tried but of course, it only came out as a comment. Did i miss an instruction somewhere? Thanks for all your help!

  109. Jeff: It should work fine with admin posts. The installation I originally wrote it on only had the admin – no other authors.

    Did you enable the setting in the options to display the list on every post? If not, then it will only show up if you manually add this keyword in the posts and pages you want it to show up on:

    <!-- ddpostsbyauthor -->

    If you use that method though, and are using the new style editor in WP, be sure to click the little html button to edit the post’s code directly, or WP will wrap code tags around it thinking its a comment and it may not display properly.

  110. Hi, I’ve enabled the plugin but don’t see it showing up on the page. Is it set to exclude admin entries automatically? All posts currently are by the admin user…

  111. NeO: Glad it worked :) I really do recommend WP 2.0 – lots of nice features, although I do not like the new text editor since it makes it hard to format things manually and add in code, but it can be disabled :)

  112. Awesome Admin! It’s working excellently… now all I have to do is upgrade so that Nicknames are used instead of the admin default! Great plugin I’ll mention it on our webmaster help forum and my next blog post! :)

    Thanks~

    NeO

  113. NeO: Sure.. the previous version of this plugin should work with WP 1.5 :) I updated the article and added a download link for it. Let me know if it works.

  114. Hey Admin,

    I’m currently using v1.5.2 and will upgrade that soon…I have to upgrade my WHM first ;) Any quick fixes for the time being?

    Thanks

    NeO

  115. NeO: What version of WordPress are you using? I recently updated a few things on this script, and it may be using some database fields that are not there in previous versions.

  116. Hey all,

    Any chance that someone could take a look @ my blog and tell me what’s going on with this error?

    WordPress database error: [Unknown column 'display_name' in 'field list']
    SELECT display_name FROM wp_users WHERE ID = 3 LIMIT 1

    I’ve just gained a new author @ my blog and wanted to be able to use a plugin that will show who’s posting what… I’ll leave this up for the rest of the day then I have to pull it so it doesn’t look busted ;)

    Thanks in Advance,

    NeO

  117. The Technocrat: Will do ;)

  118. nice! now that really is lookin’ good. Let me know when you want ideas for 1.5… :-D

    Good job bud, proud to use it.

    http://geeklimit.com/technocrat/last-10-posts/

  119. Version 1.4 has been released. Future-dated posts no longer show up, and the author’s ‘display name’ is now shown instead of the login name. :)

  120. The Technocrat: Thanks, that saves me from having to look it up :)

    And don’t worry, I always like suggestions. :) I get quite a lot of them and cannot possible add in every feature possible to every script, but I try to always implement things that fix bugs and improve the functionality :)

  121. cool man… I’ll give you a head start:

    In WP2.0, the wp_users table contains the user’s login (system) ID at user_login. The records also contain values at user_nicename and display_name. I’m going to guess you’re using a call out to the record: where user_login=post_author, display user_login. If it were me, I would make it easy on myself and do: where user_login=post_author, display display_name.

    :-)

    Again, I hope you don’t think I’m all like: “DO MY BIDING ALEISTER!”, just trying to help the plugin’s development over here…

  122. The Technocrat: Ah yes. I keep forgetting about future posts on some of these plugins. I thought I had added the check in but I guess not. I will fix it when I get home today, and also make sure it shows the actual ‘display name’ field :)

  123. ah ha..that should have been obvious, sorry I didn’t notice.

    about the name, if you go in the user preferences page of WP, every author gets the option of how they want their name displayed. SO basically, John Doe can have the login id ‘jdoe’ with the password ‘password’, but when they write a post they cn have their name displayed as ‘JDoe’ or John Doe’ or ‘John the computer guy’ or whatever. For example. you could go in there and although you can’t change your login ID from Admin, you could make the name displayed throughout your blog be ‘Admin the plugin guy’, and it would be changed everywhere on your blog. So basically, the plugin is pulling the author name from the ID field, and not the preferred display name field. I can tell, because my login ID is ‘technocrat’, but I have my display name set as ‘The Technocrat’. http://geeklimit.com/technocrat/last-10-posts/

    Also, I just made a post that is post-dated for July 4, and it shows up in the list. You might want to put a conditional statement in the loop so that when the post date > today(), don’t put in the display array…

    I don’t mean to dump all of this on you, I could do it myself, but I figure it’s smarter to keep the plugin the same and come out with new revisions, than just have me change this stuff and release it as a branch…

  124. Version 1.3 has been released. It fixes a bug where posts would show up multiple times if they were in multiple categories.

  125. The Technocrat: Ah. The duplication problem happens when posts are in multiple categories. I will fix :) Also, where is it showing you the ID instead of the display name? Your site looked fine to me, unless I missed it.

  126. also, note that the plugin displays the author’s login ID, instead of their preferred display name… just fyi…

  127. sorry, forgot to check ‘notify me of replies’…

    here’s an example…also, it appears that they’re coming up more than twice on some posts…?

    http://geeklimit.com/technocrat/

  128. Ah yes.. hiding future dated posts would be a good idea.

    You said some of your posts show up twice.. any idea why? Or can you show me an example?

  129. I’m trying to use the plugin… It displays posts I have scheduled for publishing at a future date… I don’t want these posts available until the date I set, so that gets a little undermined…

    Alao, this plugin displays some of those posts twice, but not all of them.

    Should be a simple addition for version 1.3 to say that if post-date > today(), do not show…

  130. Version 1.2 has been released!

    Option added to sort posts by date – newest or oldest first. I have also added support for category exclusion. So posts from specified categories will not show up in the recent post lists. A bug was also fixed where the list would also include pages and attachments. It now just shows published posts.

    Neil: There was a problem with the code I showed you. The new category exclusion feature should work nicely for you.

    Benn: I just tested this plugin with WordPress 1.5 and it seemed to work fine. Maybe another plugin is conflicting with it.

    Russ: I just added a new plugin that will do what you want – Other posts from Cat

  131. Admin,

    I tried the code substitution that you posted below because I want to be able to limit which categories are shown, an it is giving me an error on line 179. Am I doing something wrong?

  132. It is very possible. It should be an easy rewrite of this plugin.

  133. 17
    Russ

    This is cool, thanks, is there anyways to have one of this for a last 5 post by category?

  134. The easist way would be to set that author as the author of that page.

  135. 15
    Russ

    Can i make it a specific authour? is there a switch for that?
    that way on my pages for authors i can set specific author

  136. 3stripe: Try something like this..

    Change this:

    $last_posts = $wpdb->get_results("
    SELECT ID, post_title, post_date 
    FROM {$table_prefix}posts 
    WHERE post_author = {$c_author_id} 
    {$ddpa_inc_current} 
    ORDER BY post_date
    LIMIT {$ddpa_num}
    ");

    To this:

    $last_posts = $wpdb->get_results("
    SELECT ID, post_title, post_date, post_category  
    FROM {$table_prefix}posts 
    WHERE post_author = {$c_author_id} 
    AND (
    (post_category = 10) OR
    (post_category = 20) OR
    (post_category = 30)
    )
    {$ddpa_inc_current} 
    ORDER BY post_date
    LIMIT {$ddpa_num}
    ");

    Where 10, 20, 30, etc.. are the allowed categories. :)

  137. Wow nice plugin!

    I’d also love the restrict the output to posts from specfic categories

    Keep up the good work, 3stripe.

  138. Thanks – I do appreciate it.

  139. Actually I think I have version of WP 1.5 installed somewhere. I will test it out and see if I can make it work for that too.

  140. Hi there. It wasn’t producing any content, so no visual errors.

  141. Benn: It was made for version 2.0. I could see about making it work for 1.5 as well though. What is it doing when you enable it exactly? An error message? Or is it not outputting anything at all?

  142. Which versions of WP is this for?

    Trying 1.5 and no luck.

  143. Version 1.1 has been released. The comments bug has been fixed! You can now choose to enable the plugin for all posts, or manually run it where you want. Read above for more information (in the Options section).

  144. 6
    Casey

    That would be awesome! I’d love to see it work manually, where I’d just need to put something like to get it to work.

    And yes, fixing it so the current post creates a bullet item would be nice, too.

    I really want to use this plugin and would be very happy to do so if you can fix it so that it doesn’t break the comments!

  145. I did not notice that when the current post is skipped, it still creates a list item for it. I will fix that tonight.

    Perhaps it would be best if instead of having this plugin run automatically at the bottom of every post, I set it to only run when you put in the keyword to call it up. That way it could be placed wherever you like.

    What do you think? Since you are the only one commenting so far, and I am not even using this new plugin for anything, I do not really care which method it uses ;)

  146. 4
    Casey

    This plugin seems to interfere with display of comments. When you click the comments link, you are taken to the single post page with the post and the rencent posts by author but no comments are displayed.

    I had to disable it to get comments working again. Since the plugin doesn’t allow you to manually place where it goes, this is a disaster.

  147. 3
    Casey

    OK, how can I modify the plugin code to show the post title (but not link it) for the current post? I really don’t like the “empty” bullet in the list and I’m not showing the date for each post, so it looks well, broken. Ideally, I’d like to modify the right bit of code and add a class to display this using a specific style… rather than have it just be empty.

    Your help appreciated!

  148. 2
    Casey

    OK, nevermind, I see that this automatically happens when you view a post by clicking its title. Is there someway to exclude a specific category of post (home) from being listed in the last x posts?

  149. 1
    Casey

    Are there instructions for what code to add to a category template to call the functions associated with your plugin? Thanks!

Leave a Comment

Before you comment: If you are having an issue with a script, please make sure you have read the entire article. Also, please read through the comments because most common issues have already been discussed many times. Thanks.


Be sure to wrap all code in <code></code> tags.