Employment

Kuwait

Lifestyle

Reviews

Society

Home » Programming, Wishlist

Wordpress Plugin: Show Posts by Selective Category

Submitted by DA on Thursday, 18 October 2007View Comments

Show Posts by Selective Category‘ is my first plugin for Wordpress 2.3.x. This plugin will allow you to show specific number of posts from a selective category. To use this plugin, you have to place a tag in the following format in your posts or pages [pbc=CategoryID count=num_of_posts]

Example

To show 4 posts from category with ID 22

    To show 100 posts from category with ID 6

      Download this plugin from Wordpress [LINK]

      • Hi.. This is wonderful plugin, but I have problem. Each category show double post (2x), like http://lyrics.melodanta.com/artist/a/agnes-monica , I really like this plugin. I hope you will fix this problem..

        (I use wordpress 2.9.1)
      • Dries
        Hey,

        I very much like your plugin!
        But is there a way not only to show a list of the posts of a certain category, but also show the content of those posts?

        Thanks again for the wonderful plugin.
      • This plugin will NOT allow you to show specific number of posts from a selective category. It will only show a list of post titles, with links. Please describe plugins properly.
      • This plugin will NOT allow you to show specific number of posts. It will only allow you tu show a list of titles of specific number of posts. Please desribe plugins properly.
      • hi.. i want to use this plugin in wedgits. How can i use this.. Please do reply sir please please.. i really want to use this useful plugin in wedgits.. Thanks.. please do reply
      • I LOVE this plugin...

        For userbility, it's amazing.
        For SEO, even better!

        One small suggestion though, if you ever developed this further. Would be great if you had the option to show a small excerpt.
      • Hi There,

        This plugin is exactly what I needed and was looking for!

        Except I'm having one slight problem, the plugin shows some posts double, have you seen this error before?

        Once again, thanks for the great plugin!
      • Martina
        How do I reference this in a template file
      • any code for theme files.. using wp 2.7.1

        thanks..
      • Unfortunately, this Plugin broke when I updated to 2.7

        Any chances of a new update?

        Thx
      • vaibhav
        Hi, This plugin is too good and useful but i need description with same as link can any one please let me know about this

        Thanks..
      • cobalt
        Is there a way to show the contents of the posts, instead of links to the posts?

        thank-you, ver 1.5 works well as described for WP 2.63
      • Jason
        I'm currently using this plugin. I wanted to know is there any way I could display the date of the post along with the title for this plugin. If there is some code I could use to edit the existing plugin to have it display date of the post as well? If you could email me to let me know, I would appreciate it :o)
      • Hey,

        Since you updated to 1.5 and used my code above why not give credit where credit is due? Anyway thanks for updating...

        ~Phil
      • I found an error in the code that makes it not work correctly at least with Wordpress 2.6, it doesn't get the category correct.

        You need to change the code on line 17 which does the database query.

        I will try to post here, not sure if WP will mangle the code in the post.

        ---
        $pbcresults = $wpdb->get_results("SELECT * FROM $wpdb->posts,$wpdb->term_relationships, $wpdb->term_taxonomy WHERE $wpdb->posts.post_type = 'post' AND $wpdb->posts.post_status = 'publish' AND $wpdb->term_taxonomy.term_id=$catid_in AND $wpdb->posts.id =$wpdb->term_relationships.object_id AND $wpdb->term_relationships.term_taxonomy_id=$wpdb->term_taxonomy.term_taxonomy_id order by $wpdb->posts.post_date desc,$wpdb->posts.post_title asc LIMIT $count");

        ---
      • Actually, it is not working. There is a funny rectangular box before each list of posts. And also, it isn't pulling up the right posts in each category.

        Thank you.
      • Hi, I am working with your plugin to create a list of recipes in categories. How would I go about getting the list of posts to be alphabetized? I am using WP 2.5.1 and it appears to be working.

        Thank you.
      • I have this working on both WP 2.33 and 2.5

        There is something strange with the category numbers, sometimes they make sense, sometimes they dont!

        I made a test post with all category numbers from 1-20 to see what worked.

        Click my name to visit HollowVision.com which uses this plugin 4 times on the front page. Great plug once you figure it out!
      • Sid
        lol, I thinks you are not gonna check for the taxonomy id but for term id.
      • i also got the same result as Zeb, i am wondering as to how exactly di d Harald got it to work...

        harald??
        :)
      blog comments powered by Disqus