list of posts by category plugin for wordpress

List of Posts from each Category plugin for WordPress

Notice: This plugin is only working properly in WP up to 3.0

This plugin displays a list of the posts 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 header. Is very useful if your posts are under one unique category.

Download

* postsbycategory.txt up to WordPress 2.0

* postsbycategory.txt for WordPress 2.3 (new)

Installing

* Download one of the above files, rename it to postsbycategory.php (from .txt to .php), and upload it to your plugins directory /wp-content/plugins/

* Enable the plugin.

* Configure the plugin options (under postbycategory).

Using

There are two ways you can use this plugin.

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

<!-- postsbycategory -->

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

<?php echo posts_by_category(); ?>

Change Log

* 09-07-07 - v1.0 First release.
* 27-07-07 - v2.0 Second release. (Problem with Polyglot fixed)
* 09-11-07 - v3.0 Third release. (Plugin for WordPress 2.3)

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.

132 Responses to “list of posts by category plugin for wordpress”

  1. my first wordpress plugin

    [...] I have developed my first wordpress plugin: list of posts by category plugin for wordpress (I need it for a new website I’m [...]

  2. Marcelo

    Hi, thanks for the plugin, works great. There?s only one problem: i?m using Language Switcher witch is based on Polyglot, and the texts that are sorrounded by the language tags are not parsed. they look like the plugin were deactivated. How can I make it work? any ideas?
    Thanks!

  3. Frucomerci

    Hi Marcelo. Are you able to put it alive somewhere and I can take a look. I don’t understand your problem at all! thanks

  4. Marcelo

    Hi, I?m afraid it?s not public yet. But I?ll try to explain better.

    This is how it looks:

    *How-to?s
    Como postear en los 3 idiomasHow to post in different languages

    It should look like:

    *How-to?s
    How to post in different languages

    Polyglot uses this tags
    some textAlg?n texto

    And this is what?s not working.

    I apologize if my english is not very good. ;)

    Thanks for your quick response!

  5. Frucomerci

    Mm… I don’t know… sorry!

    All I do is print out the post_title!, do you know if Polyglot (I have never worked with) repeat it for each language?

    ah! I am spanish, my english is worst than yours :)

  6. Marcelo

    Ahh entonces va a ser mas f?cil esto :). Soy de Argentina, Buenos Aires. La verdad no tengo ni idea por que Language Switcher me traduce las otras secciones de mi wordpress, y esta que esta armada con tu plugin no. Tambi?n habia probado el plugin Latest From Each Category de dagondesign.com y me paso lo mismo. Si me escribis un email te puedo pasar un usuario y contrase?a para que veas como esta quedando el blog. Esto es lo ultimo que me falta para terminar de armarlo, y aunque al principio va a salir solo en espa?ol, quiero dejarlo bien para cuando se agreguen los otros idiomas.
    Abrazo

  7. Frucomerci

    Please Marcelo test it now, now it should work with Polyglot!

  8. Marcelo

    Thanks Fruco!!!! It worked perfectly! Now texts change when I switch the language.
    Lots of hours saved!
    The best category plugin by far…

  9. Marcelo

    Just one tip for internationalized category creation
    for translated names should use:
    [lang_en]News[/lang_en][lang_es]Noticias[/lang_es]
    instead of
    <lang_en>News</lang_en><lang_es>Noticias</lang_es>
    otherwise it won?t work for category names.

  10. Jason

    Thanks for the plugin. Just wondering - Is there an easy way to include category description and the date of the post? I tried playing around with it to get these included, but my PHP skills are beyond poor.

  11. Frucomerci

    Should be easy, if you couldn’t do it yet, let me know and I’ll help you!
    Regards

  12. Histoires medievales

    hello
    I’m interested in your plugin.
    but i am a beginner … I am ok with the first steps : I have downloaded it and activated it in the “plugins” thumbnail in my admin interface.
    But it doesn’t show anywhere, as if i had done nothing.
    Would you take some time to help me with that ?
    thanks a lot

  13. Astrobobo

    Would it be possible to make the plugin arrange posts by subcategories? I have topics in some subcategories which are quite specific for that particular subcategory. For example, posts in “photography -> digital” are quite different from the ones in “photography -> film”. It would be nice if we could have an option to list posts only in the exact category where it was published. Unfortunaetly I don’t have the skills to do it myself :(

  14. Frucomerci

    Hi Astrobobo!
    I am busy right now, but I will try to sort it out for you as soon as I am free!
    Thanks

  15. Astrobobo

    Thanks, you are very kind!

  16. Neil K.

    Hi, I very much appreciate the plugin you created. I have one question though. My Wordpress is setup currently with multiple PAGES. Now I’ve been trying to find a way to put Posts on those pages, but you cant as that is a limitation with WordPress. However, is there a way to use a script/plugin similar to this one that can list posts from specific categories on specific pages? Let me know. Thanks

  17. Frucomerci

    Hi Neil! There is always at least one way to build a pluggin that do whatever you need… but unfortunately I am very busy to build everything people is asking me… anyway, you can edit my pluggin and spcify from which category do you want to show the posts, and then copy-paste the pluggin as many categories you have… Thanks!

  18. WordPress Plugins Database » Plugin Details » Posts By Category

    [...] Visit [...]

  19. Robert Feddes

    Hi Neil,

    Great plugin, one question, how can I get the plugin to only show the posts of one category?

    thanks

    Robert

  20. Frucomerci

    Hi, Thanks!
    You can edit it easily. Change the “Select post_id FROM $wpdb->post2cat WHERE category_id =$posts->cat_ID” for the next one: “Select post_id FROM $wpdb->post2cat WHERE category_id=X” where X is the ID of the category you want to show.

    Let me know if you have any problem.

  21. Robert Feddes

    Hi Neil,

    Thanks for that, if I do that I can only use this script to show posts from one category.

    This is what I would like to do, when in one category, show all posts in that category in the sidebar, then when in another category show posts in the sidebar only belonging to the category that the visitor is in.

    In other words, how can I make this dynamic, so it reads the catid from the page it is on and feeds that into the script.

    Thanks for your reply, if this can be fixed, man I will buy you your beer for sure!

    thanks

    Robert

  22. Frucomerci

    True, hehe!

    Should exists a function to get the category from the page is on… try this function “get_category_by_path()” from the category.php
    if not, you can do a simple thing, on your uri structure, choose to show the category, then split the url and having the name you can know the ID easily with “get_cat_ID”…
    Sorry I don’t do it but I am very busy with other stuff!
    I hope it helps!

    Frucomerci

  23. Robert Feddes

    Thanks for the reply, but that goes beyond my skills, I only know what I would like, too bad, will see if I can find it elsewhere.

    All the best,

    Robert

  24. Meyithi

    I don’t think this plays nice with wordpress 2.3 - seemed to create a lot of errors and eventually made some posts lose their categories even without calling the plugin. I could only fix it by disabling the plugin even though I had no page using it.

  25. Frucomerci

    I don’t know, I have tested only with wordpress up to 2.2….
    Sorry, I will try to sort it out as soon as I can!

  26. canarkadaş

    Thanks..
    [?] A?ıklamalı 232 Wordpress eklentisi (Agu. 15, 2007 !!) (Wordpress plugin list),[?]

  27. Adam

    yeah :( it’s broken with 2.3

  28. Paolo Gatti

    The plugin not work with Wordpress 2.3 :-(

    Bye, Paolol

  29. Rhino

    There’s a new way of doing sql queries using $wpdb->prepare() in 2.3.

    Thanks for the plugin.

  30. Paolo Gatti

    Please, is there anyone who tells me exactly where i must make the changes?

    (or send me by mail the modified file!!) :-D

    My email: logatto [AT] jumpy.it

    Thank you, Paolo.

  31. Adam

    i don’t really understand the fix — has there been any update to the plugin yet? my site’s on hold until i can get hold of this useful plugin. thanks!

  32. Frucomerci

    The fix posted on a comment was not for this plugin…. I am very busy next two weeks but I will update the plugin as soon as I have sort this problem with WP 2.3. out… anyway, if someone has fixed and is so kind as to send send me the updated plugin I will appreciate it so much.

  33. yurec

    Has some ERROR:

    [Table 'www_db.wp_post2cat' doesn't exist]
    SELECT post_date, ID, post_title, cat_name, cat_ID FROM wp_posts, wp_post2cat, wp_categories WHERE wp_posts.ID = wp_post2cat.post_id AND wp_categories.cat_ID = wp_post2cat.category_id AND post_status = ‘publish’ AND post_type != ‘page’ AND post_date

  34. Adam

    Hi there — has there been any progress with this plugin fix yet for 2.3? Thanks in advance.

  35. Robyn

    How to limit the number of posts listed under the categories?

  36. Sim Blog » Blog Archive » WP??-list of posts by category

    [...] ???? [...]

  37. andy

    Your plugin rocks - but how about the update for 2.3

  38. Rachael

    Hi There .. with the template I use links do not show in bold, therefore my Categories are not being distinguished from the posts by showing in bold. Can you provide me with a code to indent the posts instead?

  39. Frucomerci

    Hi Rachel,
    you can edit the plugin easily if you now a bit of html,

    Categories are shown on this line:

    <li><strong><a href= . get_category_link(posts->cat_ID) .> . apply_filters(list_cats, posts->cat_name, $posts) . </a></strong></li>

    and Posts:

    <li><a href= . get_permalink(arcresult->ID) . > . apply_filters(the_title, arcresult->post_title) . </a></li>

    I hope it helps u!

  40. Rachael

    I know HTML but not PHP so thanks for that.

  41. Milorad

    I’d love to see an update for 2.3 as well. This is exactly the sort of thing I’m looking for.

    I’m not a huge fan of ‘me too’ism except that you have no other way of knowing how desirable your plugin is.

    Cheers :)

  42. Pristine

    Hi there! I’m eagerly awaiting your update for 2.3, as yours seems to be the only one to do the job. Fingers crossed!

  43. Frucomerci

    Hey people, yesterday I was working on the 2.3 update, I hope will be finished very soon!! Is almost done!

  44. posts by category plugin for wordpress 2.3

    [...] I had time (even though I am very busy, I promise) to fix the wordpress plugin: list of posts by category plugin for wordpress for WordPress [...]

  45. Milorad

    Good news! Thanks F. :)

  46. Jonathon

    Like Robert Feddes above, I want to know:

    How can I make this dynamic, so it reads the catid from the page it is on and feeds that into the script?

    David (Frucomerci) replied:

    To get the category from the page is on? try this function ?get_category_by_path()? from category.php. If not, on your uri structure, choose to show the category, then split the url and having the name you can know the ID easily with ?get_cat_ID??

    I added to category.php, but that showed nothing, so I replaced it with , but that still showed nothing, so I think that means the function won’t work within the posts-by-category code.

    My Options - Permalinks are set to include the category in the uri/url.
    How do I split the url to extract only the cat name?
    How do I code to convert the name to a cat_ID?
    php get_cat_ID(name)?

    Thanks.
    I look forward to Wordpress having this functionality, thanks to your plugin.

  47. Jonathon

    I tried to include code in the above (within brackets, but it was eliminated, so I'll repeat that part here.

    I added to category.php, but that showed nothing, so I replaced it with , but that still showed nothing, so I think that means the function won?t work within the posts-by-category code.

  48. Jonathon

    One final try - I had added spaces around the > and

  49. Jonathon

    Finally - I had added spaces around the greater than and less than signs, which usually gets the code treated as not-code, since no code has spaces by the greater/lesser brackets, but it was eliminated, so I’ll repeat it here.

    I added
    ?php get_category_by_path(); ?
    to category.php, but that showed nothing, so I replaced it with
    ?php echo get_category_by_path(); ?
    , but that still showed nothing, so I think that means the function won?t work within the postsbycategory.php either.

  50. Jonathon

    P.S.
    I’m using WP 2.3.1 and your brand new Posts-by-Category 3.0 for WP 2.3.

  51. Robyn

    Is there a way to limit the number of posts under each category? For example, I want to list only the most recent 10 posts. Thank you. This is a very good plugin. Easiest to use and does what it promises.

  52. Frucomerci

    If you want to have the recent 10 posts, you need to change the Sql query string,
    put this:

    If your plugin is for < 2.3
    $arcresults = $wpdb->get_results("SELECT *, COUNT( `ID` ) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' AND ID IN (Select post_id FROM $wpdb->post2cat WHERE category_id =$posts->cat_ID) GROUP BY 1 ORDER BY post_date DESC LIMIT 0 , 10;");

    if is for => 2.3
    $arcresults = $wpdb->get_results("SELECT *, COUNT( `ID` ) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' AND ID IN (Select object_id FROM {$tp}term_relationships, {$tp}terms WHERE {$tp}term_relationships.term_taxonomy_id =" . $posts->term_id . ") GROUP BY 1 ORDER BY post_date DESC LIMIT 0 , 10;");

    Should work!

  53. Robyn

    Yes, that worked. Thank you!!

  54. Javier

    Little question: Is there a way to not show empty categories? thanks in advance!
    Y muy buen trabajo ;)

  55. Melissa

    Hi, when I tried activating this plugin, it gave me the following error above each post:

    “Warning: Invalid argument supplied for foreach() in (the postsbycategory PHP filename) on line 114.”

    Line 114 is: foreach ( $arcresults as $arcresult ) {

    How do I fix it? The plugin works, but the error is a big deal, especially since it repeats itself 3 times per post!

    Thanks for any help/suggestions, I’m new at this!

  56. Frucomerci

    Javier: I will take a look as soon as possible, but if the categorie is empty, why do you have it? :)

    Melissa: Put this before the line 114
    if (is_array($results) || is_object($results)){
    don’t forget to close the } (just before $the_output .= ”;)

  57. Melissa

    Hi, thanks so much! That fixed it, but I have another question…it shows only a list of the categories, and not the posts within each category, even though the posts exist. I’m sure the fix is very simple but I don’t know what to do…

  58. Frucomerci

    Melissa, try changing:

    if (is_array($results) || is_object($results)){

    for

    if (is_array($arcresults ) || is_object($arcresults )){

  59. Joelle

    I was curious if you could show how to indent the subcategories so there is a heirarchy. I figured out how to adjust my list so that my categories are h3 headings and the unordered list begins after that, but it just lists all my categories in one big list, even though some have subcategories. Is there a way to account for this in the display? I’m not that well-versed in PHP.

    Thanks! :-)

  60. klisics

    Hi
    I don’t know if anyone had this problem:

    In the term_taxonomy table the term_taxonomy_id and the term_id are not always the same number. I think the selection in the plugin presumes that they are equalled.
    for example in my term_taxonomy table they are equal until 19 but from there:

    term_taxonomy_id: 21,22,23,24,40,26
    term_id: 20,21,22,23,38,24

    The term_id : 20 is a category here. And nothing shows up in the final page. Why?…
    When the plugin makes the selection by this:
    term_relationships.term_taxonomy_id =” . $posts->term_id . ”
    it looks for term_taxonomy_id=20 but it should look for 21…
    (I don’t know if I’m clear enough..)

    I came up with this but I’m little-more-than-beginner in mysql/php:
    I changed this:
    term_relationships.term_taxonomy_id =” . $posts->term_id . ”
    to this:
    term_relationships.term_taxonomy_id =(Select term_taxonomy_id FROM {$tp}term_taxonomy WHERE term_id=” . $posts->term_id . “)

    If there’s a better solution for security/performance reasons please post it.
    Sorry for the long post… :)

  61. rudi

    Hi
    Thx before for this nice plugin…. :)
    but theres a problem when i use it in my site http://www.bali-weddingplan.com
    Theres a sql error …. :(

    Can you help me ??

  62. Frucomerci

    Which WP have you installed??? 2.3? I think you have installed the pluggin for 2.3 and you have a previous version…

  63. rudi

    hi man thx for the reply :)
    i use 2.3 version, but i have mysql 4 in my server (no problem in mysql 5)
    i’ve got this error

    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 'Select object_id FROM wp_term_relationships, wp_terms WHERE wp_]
    SELECT * FROM wp_posts WHERE post_type = ‘post’ AND post_status = ‘publish’ AND ID IN (Select object_id FROM wp_term_relationships, wp_terms WHERE wp_term_relationships.term_taxonomy_id =1) ORDER BY post_date DESC

  64. rudi

    Hi again, i’ve a solution for Mysql 4.x (not support sub queries) you can read the manual at http://www.devchunks.com/dev/subquery-workaround-in-mysql-4/ sorry 4 disturbin you man…

    Thx again for this plugin

  65. Nick

    Hi, Great Plugin.

    Is it possible for your plugin to do the same thing but list posts by Year Headings?

  66. jmoney

    Great plugin, so thanks! Quick question:

    I want a page listing only the categories that currently have posts in them.

    I don’t want links to the individual posts, just to the categories.

    I don’t want links to categories that are empty (like “Uncategorized”).

    Can I edit the plugin to do this? Thank you!

    Yours,
    J

  67. 230 Wordpress eklentisi — Wordpress T?rkiye

    [...] Postsbycategory [...]

  68. Frucomerci

    #jmoney, of course you can edit it. Php is opensource, isn’t it? ;)

  69. Michael

    Hi,

    Is there was way to make the categories listed in a hierarchical fashion? I had a quick look at the php, but I’m anything but proficient at it, but if you post the snip that would need to be changed… if indeed that is all it would take. :)

    Cheers!
    Michael

  70. Frucomerci

    #Michael, there is always a way, unfortunately I don’t have time to do it, so busy I can’t do everything people ask me… Sorry man!

  71. Michael

    No worries!

    Thanks for a great plugin. :)

  72. Jenny

    I am wondering if anyone has figured out how to include the category description (for the 2.3 version). I’ve been struggling with this all day.

    Thanks!

  73. Diane

    Excellent plugin - thank you. I’m having trouble on this site: http://brownfields-development.com/site-map/ Not all of the posts for the category are being shown.

    I am running WP2.3 and used the correct plugin (although both seem to have the same version #?)

  74. Chris Masse

    Hi there,
    Do you know how I could list the posts of one particular category only, as opposed to posts from all the categories?
    Thanks.

  75. Nick

    Hi, I would also like to know how I can list a post of one category instead of all. You have described it in version 2.2 before but I’m using 2.3. Which lines should I change?

    Thanks a lot your plugin is one of the most useful out there!

  76. Bryce

    Hi,

    thanks for the plugin!

    on my website Kicktopia.com, on the right you can see I’m using your plug-in. However, under the heading JB, it is displaying posts from a different category which makes no sense. It also doesn’t display the post found at the top of the page which is filed under the JB category.

    how do I fix this, i need help urgently!

    thanks!

  77. Bryce

    bump!

  78. Frucomerci

    Chris Masse and Nick, the easiest way to do it is put this after “foreach ($last_posts as $posts)”:

    if (apply_filters(’list_cats’, $posts->name, $posts) = “CATEGORY_NAME”) {

    //actual code

    }

    Close it after $the_output .= ”;

    I haven’t tried but shoud works, :p

  79. Frucomerci

    Bryce, no idea what is going on with your navigation man, is weird! Why only happens with JB and New Balance and the rest are fine?

    You should take a look to the database and the two sqls to print out the posts

    $last_posts = (array)$wpdb->get_results……. catch the categories

    $arcresults = $wpdb->get_results(”……….. catch posts from one category

  80. Bryce

    Hi Frucomerci, I’m no wiz with PHP so I couldn’t find any problem with it.

    As much as I love the plugin, I had to leave it, and hacked Dagon Design’s sitemap plugin and it’s working better now. Let me just say, yours was a lot easier to understand than this one! haha.

    thanks anyway!

  81. Frucomerci

    Hey Bryce, sorry but PHP is not my strength language neither… glad you find a solution!

  82. My-Hou

    Thanks Frucomerci

  83. Manele

    i was looking for this solution for a long time! the plugin is great!

    Thx!

    Manele

  84. Jonny

    Having this same problem of the post being mixed up in the categories.. Please tell us a fix.. This is the only plugin like this I can find that almost works right!

  85. mtchairs

    Hi,

    I have a similar request to a couple of posts above. I would like to list the posts of only 3 of my categories - Articles (ID 12), Reviews (ID 11) and Interviews (ID 13). This will make up the content of the “Press” page of my website.

    Is this possible and are you able to give me the change to the code necessary?

    Thanks in advance!

    mtchairs

  86. Frucomerci

    #Mtchairs, put this after ?foreach ($last_posts as $posts)?:

    if ((apply_filters(?list_cats?, $posts->name, $posts) = “Articles”) || (apply_filters(?list_cats?, $posts->name, $posts) = “Reviews” ) || (apply_filters(?list_cats?, $posts->name, $posts) = “Interviews”)){

    //actual code

    }

    Close it after $the_output .= ?;

  87. mtchairs

    Thanks so much for you plugin and for your quick response. Would you mind sending the file as it should be? I tried following your instructions above and got a fatal error message. I’m not sure what I’m doing when it comes to php.

    mtchairs

  88. Frucomerci

    Sorry #mtchairs, I had an error on the PHP code, please change it for this one:

    if (( apply_filters(’list_cats’, $posts->name, $posts) == “Articles” ) || ( apply_filters(’list_cats’, $posts->name, $posts) == “Reviews” ) || ( apply_filters(’list_cats’, $posts->name, $posts) == “Interviews” )){

    I hope it fixes your problem.

  89. The Posts By Category Plugin For WordPress Blogs Proves Very Helpful For Me | Make Money Online | Blogging tips, tricks, and news - Mark Givens dot Com

    [...] On some of my blogs I have compiled a list of 101 various things, and in order to display each post on the list I went WordPress plugin searching and ended up with Posts by Category. [...]

  90. Jeffrey

    Nice code. I need to tweak it so that it only displays a list of the posts in the current category. Not on an archive page, but on a single post page. I’m displaying the list in a sidebar.

    I read through the comments and there are some people who were wanting to do the same thing, but a solution was never really given clearly. And if it was, I missed it. :-)

    So… how do you do it? What needs to be tweaked?

    Thanks in advance. :-)

  91. mtchairs

    Hi,

    I’ve still got problems with the posts that are showing up for the two categories that I’ve chosen to display.

    The category ‘Articles’ should have 11 posts - instead 2 posts from the ‘Theatre’ category are appearing there.

    The category Reviews should have 11 posts - instead 10 posts from the ‘Articles’ category are appearing there. Only 1 post is showing up correctly.

    Any ideas how to sort this out? Would using the Cat ID be any better at matching the correct posts to the correct category?

    Thanks

    mtchairs

  92. Frucomerci

    #mtchairs ,
    Man, I don’t know what is going on with this new version of WP, for some people the plugin runs fine, for some not.
    Yes, may be try that, change the Cat ID instead of the Name, my strength is not PHP, what I do, is play with the database fields and functions from WP until something works.

    Sorry but I am very busy and also I don’t have 2.3 installed on my blog…
    Anyway, good luck and have a nice weekend!

  93. GTW

    Hi, this is a very handy plugin that I use for my blog, I think the idea of using it for a site with uncategoriezed posts is a cool little hack that i have blog it would be really good for. Thanks!

  94. Santosh

    Hello:

    The plugin is working on my site, but I request you to help me in beautifying it more!

    I need a couple of blank lines inserted before “Archives by month:”. and also before the “” in the Archives.php.

    Also, the entire result comes aligned to the left edge of the page. What to do so each line starts with a couple of blank spaces?

    Please help! Thanks!

  95. Santosh

    Please read “php get_footer()” code above in the “”. The actual code was written there, but the system hid it!

    Thanks again!

  96. TeamCRO

    Is there a way to set the number of post the plugin takes. I wanted to se it to 5 posts.

    Thanks great plugin

  97. List of Posts from each Category plugin for WordPress_Wordpress plugin

    [...] Plugin Homepage [...]

  98. 300 Adet Wordpress Eklentisi : Y?lmaz Eres

    [...] Postsbycategory [...]

  99. Ed

    Hi there

    I just came across, and used very successfully, your posts by cat
    plugin. Nice work! I have no idea myself, but dabble some.

    I made a few amends.

    NESTED LIST:
    I (too?) couldn’t work out where to place the to create a nested
    list, so went for giving child items a class, which then has a left
    margin applied.

    EXCLUDE EMPTY:

    $last_posts = (array)$wpdb->get_results(”
    SELECT {$tp}terms.name, {$tp}terms.term_id
    FROM {$tp}terms, {$tp}term_taxonomy
    WHERE {$tp}terms.term_id = {$tp}term_taxonomy.term_id
    AND {$tp}term_taxonomy.taxonomy = ‘category’
    AND {$tp}term_taxonomy.count > 0
    {$hide_check}
    “);

    The net effect of these looks like the attached.

    I don’t know how to make exclude empty a setting option, sorry.

    I hope you find these useful.

    Ed

  100. Stumbler

    Very NICE! and exactly what i was searching for.
    But is there any way to exclude a Category? Please help

  101. Richard

    I love hte plugin. I tried to edit it to shwo only one category and it came up as a fatal error. I am using 2.3. Can you be more specific on how to make the change?

  102. Mobby

    Can anyone please explain to me how i can order the categories shown and how to hide specific Categories. Thanx

  103. Ben

    same here, Plugin doesnt work for subcategories correctly and I dont know how to rearrange the Categories. Please Help. Could someone right an totorial?

  104. Andr

    Hi, I’m using the version for WP2.2 and am also trying to exclude categories… The above method creates a fatal error, as said. Can anyone figure out a way to do it?
    Thanks!

  105. manele noi

    Thanks, you are very kind!

  106. Justin

    Hey there,

    I changed this (WP2.3.3) to make it render nested lists, instead of 1 very big list.

    $the_output .= 'term_id) . ‘”>‘ . apply_filters(’list_cats’, $posts->name, $posts) . ‘‘;

    becomes

    $the_output .= 'term_id) . ‘”>‘ . apply_filters(’list_cats’, $posts->name, $posts) . ‘‘;

    and before this:

    }
    $the_output .= '';

    you add this:

    $the_output .= '';

    so that it looks like this:


    $the_output .= '';

    }
    $the_output .= '';

    :)

  107. Grant

    I used the helpful info on the discussion to limit the p2cat from showing the empty “uncategorized” category. Thank you Ed!

    However, I still have a problem and would appreciate some guidence:
    I only have two non-empty categories “News” (3) and “Projects” (5)
    News has 8 posts and Projects has 11 posts.

    However, on the page I see all 8 News items and Only 1 of my Projects posts.??

    Any thoughts or suggestions?

    - Grant

  108. Grant

    also….
    a suggestion: A way to include the number of comments with each post would be very helpful. It would draw readers to the most active/commented posts.
    Just a thought.

    -Grant

  109. Veronika

    I have the same problem, that Melissa. The plugin shows only the main categories, but no posts. Anyone can help me?
    Thanks.

  110. Greg

    Hi! First of all, your plugin is great and really helped me in my site. However, I found a problem. I have limited the posts by category to 10 (to make lists shorter) and everything works fine until I have 2 categories. If I want to add the third one or the 4 one, the posts under these categories are not shown. So basically, I have two categories with posts under and 2 without any posts. Can You help me with solving that? Thanks!

  111. Moguul

    Hi and thanks for the plugin Frucomerci.
    But i’m not only here to thank you. I have a problem to.
    I’d like to style the current category with css. So it would be great if the current category had a class like “.current”.

    I’d gave it a try with “if (is_category())”… but failed.
    So i thought perhaps you like the idea.

    Greetings
    -Moguul

  112. Frucomerci

    Hi everyone,
    I am really sorry but I am very busy with other stuff and can’t fix the plugin or find a solution for each one of you… Anyway, you are free to change it, update it or customize it.
    I hope you understand, sorry about that, good luck and keep trying, there is always a solution out there!
    Regards, Frucomerci

  113. list of posts by category plugin for wordpress

    [...] list of posts by category plugin for wordpress Uncategorized [...]

  114. eric

    Hey, great plugin. I had an issue that i resolved which may help others. Please note, i am NOT good at the programming stuff, but managed to do this.

    I have a list of sub categories that i needed displayed using your plugin, so i needed to specify a parent category. I added this to line 158:

    AND {$tp}term_taxonomy.parent = $cat

    you know, where $cat = whatever your parent category ID is. Alternatively, if you wanted to specify a specific category, you would do:

    AND terms.term_id = $cat

    So, hope that helps. btw, this is a great plugin. it’s just what i was looking for. thanks!

  115. pierre

    It would be great if we can choose only one category…. and display the posts of this category

  116. List posts by category | wisefaq.com

    [...] Category list list of blog post titles by category.  (modified) PHP script from David Sanchez [...]

  117. 60+Wordpress????/??? ?? | ???? ?

    [...] List of Posts from each Category plugin for WordPress ?????????????? ??. ???? [...]

  118. 60+Wordpress????/??? ?? | ???? ?

    [...] List of Posts from each Category plugin for WordPress ?????????????? ??. ???? [...]

  119. Creating a Page with a Link List - DIY Themes Forums

    [...] Does this plugin provide the functionality you’re looking for? list of posts by category plugin for wordpress __________________ - Rick Beckman, DIY Themes Support How to Ask Support Questions the Smart [...]

  120. word press eklentileri on Grafik Hocam

    [...] Postsbycategory [...]

  121. 60+Wordpress????/??? ?? : : My World

    [...] List of Posts from each Category plugin for WordPress ?????????????? ??. ???? [...]

  122. WordPress?? » Blog Archive » 60?Wordpress????/??? ??

    [...] List of Posts from each Category plugin for WordPress ?????????????? ??. ???? [...]

  123. ?????

    [...] of Posts from each Category plugin for WordPress ?????????????? ??. ???? RelatedPosts ??Wordpress??????? ???? ?????????????. [...]

  124. Wordpress En iyi eklentiler ve a??klama 400 adet | ?nternet ??pl???

    [...] ? Postsbycategory TEST Her hangi bir sayfa da veya yan men?n?zde sergileyece?iniz kategorilerin i?eri?indeki [...]

  125. SuccessFul! » 60+Wordpress????/??? ??

    [...] List of Posts from each Category plugin for WordPress ?????????????? ??. ???? [...]

  126. Nowog.com » 60??Wordpress????/??? ????

    [...] List of Posts from each Category plugin for WordPress ?????????????? ??. ???? [...]

  127. www.NewVentures.ca » My WordPress Master Index

    [...] had taken an original plugin, Frucomerci?s ?List Posts by Category Plugin and modified it for her own use. After she had what she liked, she then shared it with the world [...]

  128. 60+Wordpress????/??? ?? | Siemens Automation & Drive Product Supplier