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.6   Updated Friday, February 20th, 2009 at 7:19pm

Other Posts from Cat plugin for WordPress

This plugin will show the last X posts from the current category 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. The latest version also has an option to show recent posts from all categories the current post is in.

Download

  • Latest Release (For WordPress 2.0 through 2.8+)
  • International Version (For WordPress 2.0 through 2.2)

    One of our visitors sent in an internationalized version of this plugin, with full support for international text and date formatting! It includes English and Spanish support. This version is only supported by WordPress 2.0 through 2.2, and will not work in 2.3 or higher!

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

Change Log

  • 04-27-08 Version 1.6 Added an option for excluded categories. Also a few other minor fixes.
  • 09-29-07 Version 1.5 Updated for WordPress 2.3. Added ‘Load Default Options’ button.
  • 06-11-07 Version 1.41 Added wrapper class around output (.ddop)
  • 05-16-07 Version 1.4 Updated for WordPress 2.2.
  • 01-28-07 Version 1.3 Fixed an issue in which a database error would occur when the plugin is set to check all categories that the post is in, and it is in only one.
  • 08-09-06 Version 1.2 Now if showing posts from all categories the current post is in, you can also choose to split them up into multiple lists (per category).
  • 08-08-06 Version 1.1 By request, the plugin now features an option to show recent posts from all categories the current post is in. It also has a CSS class added for easy changes.
  • 04-19-06 Version 1.0 First release. This is very similar to my ‘Posts by Author’ plugin but it lists other posts from the same category, instead of other posts by the current author.

Notice

Currently this plugin checks the first category a post is assigned to when generating a list of other posts in the same category. This means that it will work best for those of you who only assign one category to posts.

Styling

This plugin now has a div wrapped around the output with the ddop class assigned to it. For example, if you wanted to decrease the size of the text in the output, add this to your CSS file:

.ddop { font-size: 90%; }

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:

<!-- ddpostsfromcat -->

Check all categories that current post is in

With this option enabled, recent posts from all the categories (that the current post is in) will be shown. It will also show all of these categories in the heading (if you are showing one). Disabled, it will simply show other posts in the first category this post is found in.

Split categories into separate lists

This option only applies if the previous option (check all categories that current post is in) is set. It will allow you to split up the posts into multiple lists (per category) instead of all the posts being in a single list.

Number of posts to show from this category

This is the number of posts from the current category that will be shown.

Text to show before list

This is the header for the post list. If you want to use the category title in this text, use %C.

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 other posts from this category.

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.

Excluded Categories

This is a comma-separated list of category names you want excluded from this plugin. It is not case sensitive.

Pages: « 13 [12] 11 10 9 8 7 6 5 4 31 » Show All

  1. 180
    d4b

    How to sort the entries alphabetically, I care very

  2. thanks for this great an very useful plugin!

  3. How sort post ASC DESC ??? help me

  4. Soo how to get posts only from subcategory
    inside categorys post

  5. Hi, very nice plugin :)
    for littly modify
    please help me how to change code in dd-posts-from-cat.php file for
    in categorys posts show other post titles only from this cat-s subcategorys.
    I read the entire article but can’t find sollutions
    thank you

  6. Sorry, I forgot the code-tag. Here again, what I pasted in my single.php:
    <?php ddop_show_posts(); ?>

  7. Hi! I actually used your plugin and added it in the single.php like this:
    But it shows nothing as ouput. Do you know what could be the problem? I use v1.6 of your plugin and wp2.7.1… Thanks! Jens

  8. Hi

    I have been using this plugin for over a year now and has been soo very useful. I want to add an Adsense script between the post and the links generated by this plugin. Any idea how to do that? Please help..

  9. Great Plugin!

    I saw someone else ask how to make the plugin show posts randomly rather than most recent. I’m very interested in that too. Has anyone figured that out?

    ed

  10. thanks for this great an very useful plugin!
    i also use Gengo plugin, and i wonder how can i modify this plugin to work with several languages, because this version (1.6) doens’t filter only the posts with the selected language…

  11. 170
    nelson d'aires

    to all,

    somebody uses algo gengo plugin and found out how to adjust this query to the tables of gengo?

    $category_check = " WHERE {$tp}terms.term_id = " . $c->cat_ID . " ";
    
    				$last_posts = (array)$wpdb->get_results("
    					SELECT DISTINCT ID, 
    						post_title, 
    						post_date, 
    						{$tp}terms.term_id as post_category
    					FROM {$tp}posts, {$tp}terms, {$tp}term_relationships, {$tp}term_taxonomy  
    					{$category_check}
    					AND {$tp}posts.ID = {$tp}term_relationships.object_id
    					AND {$tp}term_relationships.term_taxonomy_id = {$tp}term_taxonomy.term_taxonomy_id
    					AND {$tp}term_taxonomy.term_id = {$tp}terms.term_id 
    					{$ddop_inc_current} 
    					AND post_status = 'publish' 
    					ORDER BY post_date {$newest_check} 
    					LIMIT {$ddop_num}
    				");	 

    thanks!
    nelson

  12. 169
    nelson

    hi,

    thanks for this great an very useful plugin!
    i also use Gengo plugin, and i wonder how can i modify this plugin to work with several languages, because this version (1.6) doens’t filter only the posts with the selected language…

    thanks!
    nelson

  13. Thanks Matt,

    I can understand the work load at the same time we have our family to look after. I have replied to your email with details you asked. please check that at your convenient time.

    Thanks,
    Vivek

  14. I do read the comments – due to the overwhelming number of questions/requests on all of the scripts I am not able to personally help everyone for free of course. Check your email though.

  15. Is admin reading this comments and request ?? I am not able to use this plugin on wp 2.6.2

    I am using Revolution Church 1.0 Version.

    I try it putting both, automatic and manually the code but nothing is appearing on post pages. What can be done ?

Pages: « 13 [12] 11 10 9 8 7 6 5 4 31 » 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.