Sobek`s Posts in Category plugin
Sobek`s Posts in Category plugin is a WordPress 1.5+ plugin (works well with everything above version 1.5), which displays a list of the posts from one or more categories in virtually any way you want.
Features
- Very small
- Easy to use
- Extremely flexible
What can you do with it?
- Display a list of the posts from one or more categories as joint or seperate lists
- Use the plugin multiple times in your pages, posts, header, footer, sidebar
- Limit the number of posts displayed
- Put the result on show as ordered, unordered or comma-separated list
- Sort the output by post title, date or number of comments
- Show the number of posts that were listed
- Present the number of comments for each post
- Display the date of posting for each entry listed
- Inform which author wrote each post
Requirements
- WordPress 2.3 or above
- Exec-PHP plugin or similar to be able to make php calls within pages or posts.
Download
- Download the latest version
Version history
- v1.9 (November 11th, 2007) – display the date of publishing a post, changes in syntax
- v1.8 (November 7th, 2007) – limit the number of posts displayed
- v1.7 (November 4th, 2007) – put the result on show as ordered, unordered or comma-separated list
- v1.6 (November 1st, 2007) – inform which author wrote a post
- v1.5 (October 29th, 2007) – improves display speed and adds support for sorting posts by number of comments
- v1.4 (October 26th, 2007) – lets you output the number of comments after the link to a post, also the order of arguments supplied doesn’t matter now
- v1.3 (October 23rd, 2007) – now with the option to display how many posts you have listed with one call
- v1.2 (October 20th, 2007) – adds sorting by title or date and a small rename of the function
- v1.1 (October 17th, 2007) – features listing several categories with one call
- v1.0 (October 14th, 2007) – basic working version
Bugs fixed
- v1.9
- it’s not really a bugfix, but here goes: (hopefully) fixed Front Page Excluded Categories from limiting the display of posts on the main page when using Sobek’s Posts in Category
- v1.6
- the post count stopped being enclosed by <li> tags, since it would cause problems when the list is displayed within <ol> tags (i.e. it spoofed the numbering of an ordered list)
- v1.5
- fixed problem where more than one argument would make the function behave improperly
- fixed problem with handling a non-standard wordpress installation (i.e. with a prefix other than “wp_”)
Installation
- unzip downloaded file
- upload sobeks_posts_in_category.php to your “wp-content/plugins” folder
- enable the plugin on the “Plugins” tab in your administration area
Basic usage
PS. You may also want to read the tutorial I wrote for the plugin.
- enter
<?php sobeks_posts_in_category(xyz) ; ?>
anywhere on your page you want the list of posts to be displayed
- replace “xyz” with the number of the category the posts you want to display belong to eg.
<?php sobeks_posts_in_category(16) ; ?>
to list more than one category at once replace xyz with a comma separated list of categories eg.
<?php sobeks_posts_in_category(16,32,8) ; ?>
- enclose the function call with “<ul>” and “</ul>” eg.
<ul><?php sobeks_posts_in_category(16) ; ?></ul>
- Repeat steps 1-3 for as many categories you want
Advanced usage
Sobek`s Posts in Category plugin currently supports the following tags. If you choose not to use them, a built-in default value will be used in their place (i.e. nothing will break):
- “sort:title” / “sort:date” / “sort:comments” – sorts the output by title, date or number of comments. Defaults to “title” eg.
sobeks_posts_in_category(16,32);
will produce the same result as
sobeks_posts_in_category(‘sort:title’,16,32);
whereas this call will produce the same list of posts sorted by date:
sobeks_posts_in_category(‘sort:date’,16,32);
and this call yet again the same posts, this time sorted by “most commented”:
sobeks_posts_in_category(‘sort:comments’,16,32);
- “author” – shows the author of the post eg.
sobeks_posts_in_category(16,32);
will not show the author of the post, whereas
sobeks_posts_in_category(‘author’,16,32);
will produce the same list with the author information displayed.
- “postcount” - shows the number of posts displayed in one call eg.
sobeks_posts_in_category(16,32);
will not show how many posts were listed, whereas
sobeks_posts_in_category(‘postcount’,16,32);
will produce the same list with info about how many posts you displayed.
- “commentcount” – shows the number of comments to a post eg.
sobeks_posts_in_category(16,32);
will not show how many comments a post has, whereas
sobeks_posts_in_category(‘commentcount’,16,32);
will display the same list with the number of comments shown.
- “style:order” / “style:unorder” / “style:comma” – displays the output as ordered, unordered or comma-separated list. Defaults to a backwards compatible form as shown in “Basic Usage” eg.
sobeks_posts_in_category(16,32);
will result in an unordered list i.e. by default you have to provide the <ul> or <ol> tags yourself. If you use “style:order” / “style:unorder” / “style:comma” as argument the script will produce the <ul> or <ol> tags e.g.
sobeks_posts_in_category(‘style:order’,16,32);
will display an ordered list of the contents of categories 16 and 32 with all <ul> and <li> already supplied.
PS. The comma-separated list has no <ul>, <li> or <ol> tags.
- “limit:{x}” – limits the number of posts displayed to {x} eg.
sobeks_posts_in_category(16,32);
will display all posts of categories 16 and 32 as one ordered list. If you use the limit argument only the first {x} posts will be displayed e.g.
sobeks_posts_in_category(‘style:order’,‘limit:5′,16,32);
will show the first five posts from a combined list of both categories.
PS. The brackets in “limit:{x}” are only there to make the “x” stand out. Limiting the number of posts to be displayed is generally used to show e.g.
- a list of 5 recent posts from category #4 e.g.
sobeks_posts_in_category(‘sort:date’,‘limit:5′,4);
- a list of the 10 most commented posts from categories #5 and #6 e.g.
sobeks_posts_in_category(‘sort:comments’,‘limit:10′,5,6);
- a list of 5 recent posts from category #4 e.g.
Examples
- The sitemap of this page here (sorted by title or date with comments counted)
CSS Styling
To style the output of the list just assign a class or ID to the “<ul>” tag eg.
<ul class=”helpful”><?php sobeks_posts_in_category(16) ; ?></ul>
and modify your wordpress css file to style the entries of the list.
If you used the “orderlist” / “unorderlist” parameter the class of the container is called “sobeks_pic“, so if you want to style your list enter something like
ul.sobeks_pic {
margin:0px;
padding:0px;
}ul.sobeks_pic li {
border-bottom: 1px solid #eee;
padding:2px;
}
into your style.css
Credits
- WordPress Category Posts Plugin by Brian Groce for WordPress versions prior to 2.3. (presents the same functionality as v1.0 of Sobek`s Post in Category plugin)


3:58 pm
Handmade Wordpress sitemap – a tutorial : Sobek`s Wordpress Plugins
[...] publishing the Sobek`s Post in Category plugin I thought it a good idea to write a couple of lines about how to create a manual WordPress [...]
2:49 pm
WP插件:Sobek`s Post in Category|分类内容列表插件 | 帕兰的口袋
[...] WP官方下载页面 | 插件作者下载页面 [...]
8:44 am
Sobek`s Wordpress Plugins » Blog Archive » Update: Sobek`s Post in Category plugin v1.2
[...] Sobek`s Post in Category plugin has been updated to v1.2. It is now possible to sort the output by date, just enter ‘date as the first argument eg. <?php s_posts_in_category(’date’,3,4,5,6); ?> [...]
11:30 am
Sobek`s Wordpress Plugins » Blog Archive » Update: Sobek`s Posts in Category plugin v1.3
[...] Sobek`s Posts in Category plugin has been updated to v1.3. It is now possible to show the number of posts displayed, just enter ‘count’ as the second argument eg. <?php sobeks_posts_in_category(’date’,’count’,3,4,5,6); ?> [...]
1:32 am
Sobek`s Wordpress Plugins » Blog Archive » Update: Sobek`s Posts in Category plugin v1.4
[...] Sobek`s Posts in Category plugin is now v1.4 with an option to display a comment count with the ‘comments’ argument. I have also recoded the plugin and now it doesn’t matter in which order you enter the arguments i.e. <?php sobeks_posts_in_category(’date’,’count’,’comments’,3,4,5,6); ?> [...]
10:10 pm
Maxim
Nice plugin, thx a lot ;-)
3:44 pm
Sobek`s Wordpress Plugins » Blog Archive » Update: Sobek`s Posts in Category plugin v1.5 & v1.6
[...] Sobek`s Posts in Category plugin has now passed v1.5 and arrived at v1.6, so this post summarizes the changes made in both updates: [...]
3:54 am
Malik
Is there a way to control the number of posts that are displayed?
9:11 am
Łukasz Sobek
Not yet, but it is planned.
7:30 pm
samir
hi thanks for your work on this plugin. i am using frontpage excluded categories to exclude certain posts from the main index. in doing so, your plugin cannot see that category any longer.
is there a way for me to use the other plugin to exclude a category, and still be able to display that category with your plugin?
thanks again!
10:33 pm
Łukasz Sobek
Hmmm, weird thing that should not happpen. I just downloaded the plugin and will look into it :)
6:52 pm
Luka
Great work, thank you for this an :)
I hope you will add “control the number of posts that are displayed” into it soon :)!
Thanks again!
10:57 pm
Łukasz Sobek
Well, to be exact the next version will be out on Wednesday 7th, so stay tuned…
6:53 pm
Luka
New version? Great, great, great :)
will it contain the number of posts displayed? :)
2:36 pm
Łukasz Sobek
It does, just download it at the repository. :)
7:18 pm
Luka
Can you add the page navigation for the rest of the posts in the same category? :)
9:21 pm
Łukasz Sobek
Thought of it, but the problem here is that if you list the contents of more than one category the plugin would have to provide more than one link, listing 10 categories that would mean 10 links, which does not seem a very elegant solution.
10:24 am
Harris
Can I display the date of each post too?
11:44 pm
Łukasz Sobek
Neat idea Harris, am just editing the code and will include your suggestion (if it was a suggestion, if not, well, I like the idea anyway :)
3:15 pm
Marc Smith
Error when trying to use the plug in
WordPress 2.3.1
RunPHP
V 1.9 of the plug in.
When I try to use the sort:date or any other code that contains the “:” character, the page displays this error:
Parse error: parse error, unexpected ‘:’ in /home/bluejays/public_html/sandbox/wp-content/plugins/runPHP/runPHP.php(383) : eval()’d code on line 1
If I remove the sort:date option, the plug in works. Unfortunately, I need the date and limit options to be able to use this plug in.
Please help.
3:26 pm
Łukasz Sobek
The easiest way would be to replace your runPHP with exec-PHP, which is what I use on this site and which the plugin was tested on.
4:39 pm
Marc Smith
For whatever reason, exec-PHP is NOT working on this system.
I will try it again
5:22 pm
bricevp
I am using the plugin Sobek’posts in category.
Unfortunatly, after having put the following code on my page :
only one post appears instead of the list of posts composing the category n°6.
Could you please help me ?
7:58 pm
karimun
Nice. Maybe you could add a offset function to exclude the first x articles and a random option would also be great.
12:22 am
Łukasz Sobek
@Marc Smith: The documentation to exec-php is QUITE extensive, so if the problem is configuration, Sören (the author) should be able to track it down (maybe he already has in the 254 comments).
@bricevp: if you just post the parameters the code wouldn’t get cut off.
@karimun: something like to be able to click from one page to another without having the same posts displayed?
5:27 am
neo
hi,
why I get a error msg like “Table ‘chinv3_stockratings.sr_term_relationships’ doesn’t exist]”
what does this table sr_term_relationships comes from?
thx
6:13 am
Łukasz Sobek
@neo: this would mean that for some reason WordPress believes all it’s tables start with “chinv3_stockratings.sr_” – hope this link is use to you.
9:23 am
sobeks post | FreeWareUs.com
[...] Displays a list of the posts in one or more categories in virtually any way you want. Please read read this post for installation and [...]
11:47 am
bricevp
Marc Smith : thank you for your advice, but wich parameters do you speak about exactly ?
12:13 pm
bricevp
Hi, I have tested the code with a new “test category” composed of 2 posts : nothing appears on my page. I am using WordPress 2.3.1 with exec-PHP. Is there a problem of compatibility ?
3:54 pm
Marc Smith
Well, I’ve tried three different PHP engines.
Two say the ” : ” for the limit:X variable is ‘unexpected.
The third engine, the one you recommend does ot work at ALL, even just using the sample code he provides. He is not responding to the comment I left on his blog.
I need a way to make a list is sorted by date and can be limited.
Please advise
3:57 pm
Marc Smith
And, I am using exec-php and that is where I get the errror:
Parse error: parse error, unexpected ‘:’ in /home/bluejays/public_html/sandbox/wp-content/plugins/exec-php/runtime.php(41) : eval()’d code on line 10
in response to your code which I have as:
4:09 pm
Marc Smith
php sobeks_posts_in_category(’sort:date’,‘limit:10′,17,2);
5:20 pm
Marc Smith
It turns out the single quote use is inaccurate.
the code should look like:
php sobeks_posts_in_category(“sort:date”,”limit:10″,17,2);
7:50 pm
Łukasz Sobek
Thank you for this, but it does seem strange. If enclosed by single quotes an argument is not parsed by php (read: doesn’t care what is in them), if enclosed by double quotes php looks into the argument searching for some special things inside it. There are no arguments based on variables in this plugin that need to be “looked into”, they should all be treated as text strings or numbers – hence the single quotes. To sum it up: thank you :), I’ll post it as a possible problem solver.
7:56 pm
karimun
in reply to #19
offset function like:
http://codex.wordpress.org/Template_Tags/query_posts#Offset_Parameter
random function:
plugin displays random posts from the defined pool on page refresh.
1:01 pm
bricevp
in reply to #29 I have put this code (in PHP writing) on my page, just before Sobeks-post-in-category code : query_posts(‘showposts=5&offset=1′);
As a result, the post of another category (n°5) appears (for the record, I have asked the posts of the category n°6). I’am using K2-beta-two theme. Is there any problem in the LOOP programation ? I don’t understand very well the way it works…
3:16 pm
Łukasz Sobek
@bricevp: I’ll check, how the code behaves when limited within the loop. Hope you read the reply on the WordPress support forum about the difference in time of posting and server time, which is also something I will want to look into.
5:09 pm
bricevp
Thank Lukasz and congratulation for your plugin that is a good job nevertheless !
9:44 pm
Łukasz Sobek
Thank you, it will become better with every comment about it misfunctioning, and with every comment showing ideas that could be added :)
3:09 pm
Patrick
Any chance of people able to sort the entries by a custom field?
For example I have a custom field called seq (short for sequence) so that I can specify an exact order for the posts to appear.
8:47 am
CF
Any chance of having a code for showing only posts that belong to two or more categories? This way I could list posts that belong to categories “1″ and “2″ but not the posts that belong to only one of those categories.
3:35 pm
sobek.pl – język angielski i blogowanie » 6x TAK! Co zyskasz na odchudzeniu bloga?
[...] wtyczka: Sobek`s Posts in Category [...]
3:03 pm
WordPress Plugins Database » Plugin Details » Sobek`s Posts in Category
[...] Visit [...]
7:31 pm
Nils
Hey, can you tell me how I can set the plugin up so it shows posts from the currently active category?
4:46 pm
Sjoerd
Thanks for this nice plugin.
Yesterday I had trouble getting it to work: new posts did not show up in the list. However, they appeared today, and that’s when I found that my wordpress clock was one hour behind. This time it was my fault, however I can imagine a weblog being written in another time zone than the server’s. It is possible then that a new post is one hour in the future. I think that this plugin should also show those posts, either by using the wordpress time instead of server time (at least I suppose that that is what it does now) or by simply showing all future posts too.
1:37 am
Raid
hi!
how can i limit the post in intervallum? i mean in one post 1-10 list the post in category #16, and on the next page i list the post 11-20 in category #16. How can i do this?
4:35 am
Chris Masse
Thanks for this plugin. Have a great Year 2008.
5:42 pm
David H. Sundwall
This looks like a great plugin. I can’t tell if it has the functionality I am looking for.
Can this plugin post a loop of posts of which only belong to two specified categories?
As I understand it this plugin will includes posts from multiple categories, but I only want to inlude posts that overlap in multiple categories.
Is that possible?
11:25 pm
Cassie
Is there a way to only show the titles of the post?
11:39 pm
Cassie
Oops, I asked that before playing around with it. Obviously, thats exactly what this does.
Thanks so much! This is the plugin I’ve been searching for.
8:04 am
Aaron
Any way to show the date of each post?
6:33 pm
planner
Great plugin. I’m using it on a site that is not yet public, and just have a feature request:
It would be nice if we have the option to expand or collapse the category.
Thanks
8:42 pm
lightworker
I have about 10 categories. I can display all postings as one big list. Is there any way to automatically display the Category Titles as the header above the list of postings?
Example:
Category 1
———–
Posting 1
Posting 2
Category 2
———–
Posting 1
Posting 2
Thank you.
12:13 am
Łukasz Sobek
@#34 – I had tried to implement it some time ago but failed miserably, now that some time has passed I believe a fresh start will get this matter sorted out.
@#35 & #40 – Yes showing only posts of overlapping categories is possible, but so far I have not considered it a feature to add. Maybe it’s time to reconsider.
@#43 – Abut displaying the date with each post: You’ll want to read the description of the features again :)
@#44 – collapsing and expanding the list: this would mainly be a javascript/css problem but is still a great idea for a feature.
@#45 – about including category headers in the code: headers are currently not in the code, you have to add them manually as this provides more flexibility.
12:21 am
lightworker
“#45 – about including category headers in the code: headers are currently not in the code, you have to add them manually as this provides more flexibility.”
Thanks Lukasz. I was trying to avoid manually adding Category headers as they might change in the future. But if i could grab them automatically as an option, that would work. Maybe a feature to think about in the next release. Thanks for the hard work, btw.
1:26 am
Aaron
#46 I don’t want to SORT by date. I want to see the date.
It may not be in the current version of your plugin, but as you are using the date in the code, having a ‘postdate’ argument like you have the ‘author’ argument, would be helpful.
See my current implementation of your plugin on http://www.bicycle.net/hub/agency-for-cycling-ethics
Would LOVE to be able to show the date of each post.
11:43 pm
Łukasz Sobek
@#47 – lightworker: I’ll include it on the to-do list.
@#48 – ROTFL! Thank you Aaron. I just noticed that the feature of displaying the date with each list item is not presented in the description, anyway, here goes: use “date” in the same way you would use “commentcount”, “postcount” or “author”. Again, thank you :). BTW. Hope to see your site growing and becoming more and more popular
1:35 am
Aaron
#49 Lukasz, worked like a charm.
Glad to see what I wanted was there all along and merely needed to be confirmed by you. You may want to insert ‘date’ into the documentation, above, between 4 & 5.
Thanks!
3:58 am
Hayley
Is it possible to have the category list display using javascript or something (like SRG Clean Archives: http://www.idunzo.com/blog-archives/ – note, detailed monthly archives don’t seem to work but I don’t need them) in the following format:
Year (click to expand)
Month (click to expand)
List of posts from that month – sorted by date
Is that something I’d need to style myself (if so…any tips please?) or something that could be integrated into the plugin?
And also, thanks for creating this plugin, it could save me a lot of work!
2:23 am
kakajoe
why i can set the limit ?? i used this code
and it showing this error
Parse error: syntax error, unexpected ‘:’ in C:\xampp\htdocs\wordpress\wp-content\themes\motahu\index.php on line 240
please help me….
11:33 pm
jordie
Anyway to get this to display posts by ascending date instead of descending?
Thanks.
11:50 pm
Peter Sieburg
Hey, great plugin! About the date, is there a way to format it?
Thanks
Peter
12:33 pm
Li-An
Very nice plugin. I want the “date” feature too ! Are you hiding it ? :-)
4:59 pm
Diana
Great plugin, just what I was looking for… but sort:title not working. I’m setting up this site to be more like a CMS, and instead of using pages, keeping the content in posts.
Using either the default or adding sort:title, like this:
results in this page:
http://pugix.com/synth/category/modules/motm/
So far, this is the only custom category page I’m using with this plugin, but I really would like to sort the posts by title.
does the sort only apply to category names, not posts?
If so, do you have a suggestion on how to get posts sorted by title within the category?
5:01 pm
Diana
oops, php bracketed markup disappeared…
sobeks_posts_in_category(‘sort:title’,'style:unorder’,3)
5:15 pm
Diana
sigh… discovered I had a leading space in a title!
My bad! Plugin works great, perfect for CMS applications!
12:09 am
Diana
… now I have a new problem. The list is only showing 4 posts in the category, but there are many more.
I’ve added more posts to the category for which I use a static category page, where I use
sobeks_posts_in_category(‘sort:title’,'style:unorder’,3). I know the posts are being correctly categorized, because when I remove the page all of the posts show in the default category page. But I can’t figure out why only 4 posts are showing in the sobeks_posts_in_category list. I tried deactivating and reactivating the plug-in, no luck. Ideas?
12:45 am
Diana
heh… found the answer to this one on WP message boards:
http://wordpress.org/support/topic/143494
Problem is with offset of timestamp between web server and my local time.
You should put together a FAQ with my questions and answers! :-)
thanks again, sorry to make so many posts! Maybe they will help someone else!
11:11 pm
shurford
Hi there, looking for a bit of help with some wierdness…
I’ve implemented your plugin (great by the way! very easy to use) on this page:
http://www.brand-forge.com/?page_id=66
works fine although problem is it only lists one post and you can see from the following page there are in fact 3 posts in the category:
http://www.brand-forge.com/?cat=15
any thoughts?
thanks in advance
11:26 pm
shurford
hi, just carried out further testing, looks like its listing the pages not posts… strange as pages are not assigned to a category by default, neither is there an option to do that in wordpress page editor.
I’m using the Revolution News theme by the way.
12:58 pm
vinay
hi this is cool….but i m getting some problem. It is listing only post belongs category id 3, it is not listing others…..below is my code…
7:08 am
28x dobra wtyczka do WordPress, czyli na czym chodzi ten blog | TopBlogger – z każdym wpisem lepszy
[...] Sobek`s Posts in Category (twór własny) – WordPress w krainie CMS’ów. Wyświetl wszystkie wpisy jednej albo wielu kategorii i zręcznie ręcznie zbuduj sobie mapę strony. [...]
2:51 pm
Simon
Great plugin! Thanks. Is there a way to exclude the latest post of a category?
10:50 pm
Li-An
Is it compatible with WordPress 2.5 ?
3:35 pm
The Best Blogging Software (WordPress) + The Top 60 WordPress Plugins | Midas Oracle .ORG
[...] Sobek`s Posts in Category 1.9 » Lukasz Sobek (url) Displays a list of the posts in one or more categories in virtually any way you want. Please read the plugin page for installation and usage. [...]
9:54 pm
Mike
I don’t believe it is compatible with 2.5. Maybe I just need to reinstall or something, but I upgraded to 2.5 today. New posts don’t show up in category lists, but old posts prior to upgrade show up fine. Seems rather odd. I haven’t looked at my database to see if 2.5 is storing the data differently somehow, but I’m going to take a look now.
10:00 pm
Mike
Nevermind. Seems to work fine. It’s a problem with the my local machine and server time being different as Diana posted above.
4:33 pm
Eric Scott
For some reason the code is listing my sub-pages as well as the category posts. Any thought as to why that is?
5:10 pm
Eric Scott
Never mind. It only happens with the main default category, not with created categories.
Great Plug-in.
Thanks
8:35 pm
Karen of Scottsdale
If using WP 2.5:
You can find out the category IDs by going to yoursite.com/wp-admin/categories.php and clicking on the category, then looking in the URL, and you will see cat_ID=# … that number is the category ID.
9:11 pm
Paul
Thank you for this great plugin.
Q: Is there a way to display child categories and posts?
Thanks!
1:24 am
Alan Patrick
Hi Lukasz,
I LOVE THIS PLUGIN! Thanks :-)
However, I wanted to ask, is there any way to get the plugin to also pull the excerpt for each post along with the link to each post.
This would REALLY help automate the way I want to set upmy website with WordPress as my CMS.
Cheers!
Alan
1:27 am
Alan Patrick
Of course, by excerpt (which I would sometimes also call the post description), I mean the part that you would usually call in the theme php files with the command:
Just wanted to make sure that was clear. Thanks!
1:33 am
Alan Patrick
Oh, that code didnt appear here :-/
Well, anyway, it is a php command with “the_excerpt” in it :-)
Sorry to do this over 3 comments. Really hope you can help…
5:36 pm
Sam
Hi, great plugin!
Is there anyway that instead of having to manually add which category you want shown, you can have a setting where it shows all categories?
Any help greatly appreciated
6:50 pm
Rade
Hello, i was looking for something like this. This is the closest solution but i have one problem. I have big big list of categories, and 50 of my categories have post that is categorized with one more category. So i’m looking for possibility to get one fixed category by id and to add some code to get id from curent category page. So i have artists as categories, in same time i have only ne post for each artist called Biography, so i want to display link in sidebar that will call biography with fixed category BIO and to pick from current category (website/category/someartist). I hope i explained good. is there any chance, thanks
2:04 pm
aidee
Hello Lukasz!
Great little and useful plug-in…
I noticed someone made a request to show posts which satisfied multiple criteria i.e. show posts that are flagged with both an ID of 3 and 7 (mutually inclusive) – this would exclude posts with only ID 3 and also exclude posts with an ID of 7.
Is this functionality available? Thanks!
5:16 pm
Christian
Great plugin. It’s been very very useful. Thanks a lot.
*
One question: is it possible to use the plugin to list posts of two combined categories? For example: I have category “movies” (number X) and category “TV” (number Y). Is it possible to list all posts that belong simultaneously to both categories?
If I just add X and Y to the code, the plugin lists all the posts from category X plus all the posts from category Y, but it’s impossible to know wich posts belong to both categories.
Thanks in advance.
5:32 pm
Oracle
It is possible to make the list a drop down menu?
Thanks for the great code!
11:30 pm
Łukasz Sobek
it’s been a while since I wrote the code, so getting into it again will take some time. I’ll incorporate the suggestions made so far. Thank you :)
3:27 pm
Alex
Hello,
would somebody mind posting the entire code snippet they used to create a page with the post of one category. I have followed Lukasz tutorial but it just won’t show anything. I basically added one line of code to the page where I want to postings to appear but it stays just empty. What am I missing?
Thanks
Alex
9:47 pm
Brittany Hunter
Thank you for this plugin; it was exactly what I needed!
9:33 am
james
FYI: The link “http://wordpress.sobek.pl/sobeks-post-in-category-plugin/” listed on WordPress.org and in the readme.txt is not forwarding to this page…
7:40 am
Han
Sobek,
Please update the links to the plugin’s installation guide and tutorial in the WordPress Plugin Directory, and in the readme.txt. The links now link to an old site. I still was not able to find the tutorial, but at least with this page i can start using your plugin.
11:03 pm
Handmade Wordpress sitemap – a tutorial | ClockWorkBlogger
[...] Han: Sobek, Please update the links to the plugin’s installation guide and tutorial in the WordPress Plugin Directory, and… [...]
11:10 pm
Łukasz Sobek
@James & Han – Thank you for the notice, I’ll update the plugin desc in a couple of days.
6:41 pm
Luke Gedeon
Your link in the wordpress/extend repository points to your old site
12:24 am
Parrothead
Thanks for this great plugin.
I’m using it to create category pages with custom content along with the listings then post sub-category listings in the page as well.
It’s working great!
A future feature request be to include the post except with the title.
Cheers!
12:26 pm
Tim
How do I place the code in a sidebar? I tried using the text plugin, but that doesn’t work…
1:35 am
Christine Hill
I love this plugin. Any plans to make one that displays posts in tags? I’ve been looking for something like that.
4:07 pm
Tim Taylor
Hi Sobek,
I have just installed your plugin – thanks very much for making it available. I did notice one problem with it; I have posts which belong to multiple categories, and if I use your plugin to list two or more categories, some posts show up multiple times (i.e. once for each category). This problem can be fixed by adding the term “GROUP BY {$wp_tp}posts.ID” to the MySQL query in the plugin.
Best wishes,
Tim
7:25 am
Stephen
Hi Sobek,
From description this plugin is exactly what I was looking for.
But, I cant’ figure out how to use it.
The example above requires category “numbers” to be entered and there are no numbers associated with current categories that I can find – only text description.
Just for fun, I tried a lot of numbers, 0 1 2 3 4 5… nothing displays.
Would love to see an example of how to get this to work.
Thank you, Stephen
5:02 am
hamdendesigns.com
a wonderful tool, thanks a bunch!
4:02 pm
Erica Mueller
Same problem as Alex. Inserting code, but seeing nothing on the page. I’ve linked directly to the page I’m trying to add the code to, and as you can see, nothing is showing.
3:58 am
chloe
Hello and good day! I am currently using this plugin to archive my stories. But some stories I wrote with someone and since I can add the author in the tag, I thought it would work. It did but it never shows multiple authors. Is there any solution to this? Thanks.
9:12 pm
Piotr
witam mam małe pytanko:)
Łukasz czy możesz mi powiedzieć którą część kodu trzeba zmienić by uzyskać datę po polsku, był bym bardzo wdzięczny za odpowiedź
8:31 pm
Dan
The plugin is great but I am having one small issue. I have 2 posts categories and when I try to list one of them it also lists the the categories under the post list. For example it’ll display like this:
CATEGORY 1 NAME
-Post Link 1
-Post Link 2
-Post Link 3
-Post Link 4
-Category Link 1
-Category Link 2
I do not want those category links at the bottom, how can I remove them? Thanks.
12:01 pm
finid
Is this plugin still actively maintained? I use it on my site, but I find that only the plain vanilla call works. E.g., the call sobeks_posts_in_category(32) works, but sobeks_posts_in_category(‘limit:5′,32) does not. In fact, the latter call messes up the site.
Is any one else having an issue with the “limit:x”, or is there another way of susng it that is not documented?
TIA
12:14 pm
finid
One more thing, it also displays pages mixed with the posts, when I only want to display posts.
5:44 pm
Christian Gnoth
Hi,
I have installed your plugin, but it is not working. I looked which categories I have and putted them comma seperated but nothing is shown.
4:04 am
Marcus Vinicius
Hello, I am developing a blog and I am implementing your plugin it in. Developing the blog I came across a small problem in mysql query plugin. At the end of query “… ($) wp_tp posts.post_date <NOW () ORDER BY …" this causes a minor inconvenience will be shown for only the posts from yesterday, and a newly published post will not be listed!
Tried to solve the problem changing the sign (< less) to (<= less or equal) but strangely did not work, so I ended up removing this last where clause and it worked fine!
I hope this to be repaired in later versions so that this does not happen with other developers (it took me so long to find this problem)
Thank you.
9:08 pm
Vaidas
Hi, I can’t get the point where is my problem, maybe you’l help me:
I have listed my old categories posts and it was working perfectly, but now I have created new category and new posts there and it doesn’t show them. I can list old categories post as much times as I want, but the new one is not working. Maybe there is a limit of categories which could be listed..?
10:37 pm
Alfonso
Hello, Łukasz. Are you still alive?
I’ve found quiet a lot of references to the problem of the Posts in Category plugin also listing pages… and now it’s happening to me.
It’s used five times in a single page, yet only the fifth appearance lists posts AND pages. Just in case, the category used is #1.
It would be nice hearing from you again.
Cheers and thanks, in advance.
11:20 pm
Tyler
Hey —
Does this plugin work in WordPress 3.0? I’m trying to figure out if I’m just doing something dumb, or if it’s a version issue. I don’t want to pull out all my hair if I don’t have to :)
2:44 pm
Robin
I love this plugin.., there is 1 quirk though. if a post is private it does not display. What i have done is made a page private with sobek short code in the associated template. only registered users get to see this page. Which is great.
sobeks code displays in this page but only public posts and not private posts. Is there a work around for this? even the sidebar widget recent-post displays private posts only if the user is registered. (registered user role see private posts and pages).
Otherwise a creat little plugin… :-)
6:18 pm
φωτοβολταικα
I have followed Lukasz tutorial but it just won’t show anything. I basically added one line of code to the page where I want to postings to appear but it stays just empty
1:56 am
a
my comment was cut. once again:
this works:
sobeks_posts_in_category(1)
this doesn’t:
sobeks_posts_in_category(‘sort:date’,1)
5:37 pm
Peggy Polaneczky
Hi – Great plugin!
Would love to customize the links – change color and remove underline, and add space between them in the list. Not sure where that CSS would go.
Thanks for any help you can give.
Peggy