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.

Pages: « 10 [9] 8 7 6 5 4 3 2 1 » Show All

  1. 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 :)

  2. 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/

  3. 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?

  4. 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.

  5. 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 :)

  6. 130
    Agatha

    Oh, now it’s okkk!! =D

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

    Thanks!

  8. 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.

  9. 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.

  10. 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.

  11. 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!!

  12. 124
    Jenny

    Hi,

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

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

  14. 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..

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

    great concept…loved it!

Pages: « 10 [9] 8 7 6 5 4 3 2 1 » Show All

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.