List category posts Wordpress Plugin (English)
Description
List Category Posts is a simple WordPress plugin which allows you to list posts from a category into a post/page using the [catlist] shortcode. This shortcode accepts a category name or id, the order in which you want the posts to display, and the number of posts to display. You can use [catlist] as many times as needed with different arguments. Great to use WordPress as a CMS, and create pages with several categories posts.
Usage: [catlist argument1=value1 argument2=value2].
The arguments you can use are:
‘name’ - To display posts from a category using the category’s name. Ex: [catlist name=mycategory]
‘id’ - To display posts from a category using the category’s id. Ex: [catlist id=24]
If you use both arguments (wrong!), List Category Posts will show the posts from the category in ‘name’.
‘orderby’ - To customize the order. Valid values are:
- ‘author’ - Sort by the numeric author IDs.
- ‘category’ - Sort by the numeric category IDs.
- ‘content’ - Sort by content.
- ‘date’ - Sort by creation date.
- ‘ID’ - Sort by numeric post ID.
- ‘menu_order’ - Sort by the menu order. Only useful with pages.
- ‘mime_type’ - Sort by MIME type. Only useful with attachments.
- ‘modified’ - Sort by last modified date.
- ‘name’ - Sort by stub.
- ‘parent’ - Sort by parent ID.
- ‘password’ - Sort by password.
- ‘rand’ - Randomly sort results.
- ’status’ - Sort by status.
- ‘title’ - Sort by title.
- ‘type’ - Sort by type.
Ex: [catlist name=mycategory orderby=date]
‘order’ - How to sort ‘orderby’. Valid values are:
- ‘ASC’ - Ascending (lowest to highest).
- ‘DESC’ - Descending (highest to lowest).
Ex: [catlist name=mycategory orderby=title order=asc]
‘numberposts’ - Number of posts to return. Set to 0 to use the max number of posts per page. Set to -1 to remove the limit. Default: 5
Ex: [catlist name=mycategory numberposts=10]
You can customize the way List Category Posts shows the posts in your CSS by editing “lcp_catlist“. The generated code is: <ul class=”lcp_catlist”>, and a <li> for each post in the category.
Since version 0.2, List Category Posts includes a sidebar widget. This is still in development, since I dedicated more time to the arguments thing. It does work, but you’re welcome to test it and comment your feedback.
If you’re updating List Category Posts from version 0.1, you must change the code in the pages using it, since it’s not backwards compatible. LCP now uses WordPress’s shortcode API, in order to allow arguments. You should change the previous [catlist=ID] to [catlist id=ID].
List Category Post was written with Geany
Installation
- Upload list-category-posts directory into your wp-content/plugins/ directory.
- Login to your WordPress Admin menu, go to Plugins, and activate it.
- Add “lcp_catlist” class into your theme’s CSS for custom formatting.
- You can find the List Category Posts widget in your widgets. Hasn’t been tested, still in development, but usable.
The generated HTML looks like this:
<ul class="lcp_catlist"> <li> <a href="post_url"> Post title </a></li> <li> <a href="post_url"> Post title </a></li> <li> <a href="post_url"> Post title </a></li> </ul>
You can see it working here:
http://picandocodigo.net/programacion/
baron
Agosto 17, 2008 a las 12:39 amMozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
hi. Thanks for plugin
perfect.
Regards
fernando
Agosto 17, 2008 a las 7:06 amMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
Glad you liked it and found it useful
Thanks for commenting.
Regards
Marty
Agosto 18, 2008 a las 5:51 amOpera/9.51 (Windows NT 5.1; U; cs)
Can it works in sidebar? Is there a php version instead of [catlist=ID]? I need to display last 3 post from each category in the sidebar. I cant find any plugin for WP 2.6:(.
Mahdi Yousefi
Agosto 18, 2008 a las 8:33 amMozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
I think there is a bug in it, I active it but in option menu there is wrong link to go to this plugin option, I use wordpress 2.6.1,
Also it is very hard to find category ID if there is option to use Category name or Category slug it can be better.
fernando
Agosto 18, 2008 a las 10:37 amMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
Marty:
I’ll look to include a sidebar widget to use with it. But if you’re into PHP hacking, here’s the code to include in your theme’s sidebar to include category posts (this is a static sidebar):
Mahdi Yousefi:
Thanks for your feedback. I had another user report your error too. There’s a bug at the options page. I’ll fix it ASAP.
You’re right about findindg the Category ID, I’ll add an option to list categories by the name.
Thanks for the comments, glad you like my plugin.
Regards
fernando
Agosto 18, 2008 a las 10:53 amMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
I just committed version 0.1.1 to wordpress.org, which fixes the 404 error when trying to enter the options page. If you’re using it in your blogs, WordPress should ask you to update soon.
Toto
Agosto 18, 2008 a las 1:54 pmMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080219 Firefox/2.0.0.12 Navigator/9.0.0.6
Hi fernanado,
congrats on this great little plugin.
I have a question though. I have set the plugin to show 50 posts from category x with currently 12 posts added but it only shows 11 on the page and leaves a gap.
Do you have an idea what this could be?
Thanks alot and talk later.
Toto
Toto
Agosto 18, 2008 a las 2:41 pmMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080219 Firefox/2.0.0.12 Navigator/9.0.0.6
Hi,
i just found out that it is actually working just fine.
There was some image overlay in FireFox.
1 suggestion if that ok?
I have installed the plugin “AStickyPostOrderER” and oorted the posts differently from the way i added them. I see that your plugin still orders the posts the way i added them.
Coiuld i change that soemwhere to be compatible?
Thanks alot and keep up the good work.
Hasta la próxima!
fernando
Agosto 18, 2008 a las 3:10 pmMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
Toto:
Thanks for your comments. So the problem you mentioned in your first comment is working fine, right?
About the order of the posts, it’s a great idea, and I’ll implement it on a future release. Something like [catlist=ID order=parameter], with parameter being: title, author, date, ID, etc.
Thanks for the idea/request!
Regards
Toto
Agosto 19, 2008 a las 3:56 pmMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080219 Firefox/2.0.0.12 Navigator/9.0.0.6
Hi fernando,
yes correct. It working fine.
yeah that’ll be great if you could order it like you mentioned.
And let me say that your plugin is exactly what i was looking for. I wanted to have a page for music articles on my site but have the music articles written as posts.
But i am using the category part as an artist roster, therefore i didn’t want any article category shown there.
Give me a few days and I’ll donate something. I’m just quite skinned atm.
Thanks again and keep up the good work.
Toto
combo
Agosto 19, 2008 a las 5:06 pmMozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
where is the download link ?
fernando
Agosto 19, 2008 a las 7:19 pmMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
Toto:
I’ll work on it. It’ll be like an overloaded [catlist]. This was also exactly what I was looking for, so not being able to find anything that suited my needs, I made it.
A donation would be sweet, but not mandatory, thanks!
combo:
Sorry for that, the link was missing :P. The plugin is hosted at wordpress.org:
http://wordpress.org/extend/plugins/list-category-posts/
Shala
Agosto 22, 2008 a las 3:08 amMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15
Thanks - this plugin was just what I needed. I’m seconding the request to be able to change the sort order that displays (would like to order posts alphabetically by title).
Thanks!
fernando
Agosto 22, 2008 a las 3:26 amMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
Shala:
The request is on the way. I’m testing it and fixing some bugs right now, but as soon as it’s ready, I’ll release it. You’ll be able to order it by date, post title, author, etc., among other new options.
Thanks for your comment!
Your feedback is really important.
Regards
pdpate
Agosto 22, 2008 a las 5:16 pmMozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1
I wanted to use this as a static sidebar, how do I use that PHP snippet above with a specific category (ie what tags go around it?
fernando
Agosto 22, 2008 a las 5:57 pmMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
pdpate:
You should use that code in your sidebar.php, on your template’s directory. Here’s an example of how it might look:
The plugin will include a widget in a future release.
Thanks for using it!
Maurits
Agosto 22, 2008 a las 7:56 pmMozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0
Still gives an error in the sidebar, even when using the php. It says this:
Parse error: syntax error, unexpected T_DNUMBER, expecting T_VARIABLE or ‘$’ in C:\xampp\htdocs\nightlybuilt\wp-content\plugins\exec-php\includes\runtime.php(42) : eval()’d code on line 4
I am using PHP exec plugin as well. Maybe it is related? Thanks.
fernando
Agosto 22, 2008 a las 10:12 pmMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
Maurits:
I don’t know about that error. Seems like a specific error on your local server or something.
I’ll be adding a widget to the plugin soon.
Regards
frank guillen
Agosto 23, 2008 a las 1:06 amMozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22
Help needed, how can I set this plugin, I am doing something wrong…. Check for yourself, http://www.macevangelismo.com
fernando
Agosto 23, 2008 a las 1:16 amMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
frank:
I don’t see what’s wrong. You can try contacting me via the contact form and explain what the problem is, and how it’s not working.
frank guillen
Agosto 23, 2008 a las 1:24 amMozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22
Fernando, the problem is:
How can I make it works if I place the code into my template?
It is not working
frank guillen
Agosto 23, 2008 a las 1:26 amMozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22
See Here what I am doing:
MacDailynews
[catlist=1047]
MacIntouch
[catlist= 2502]
Placed directly in the template, if I create a page or a post the plugin works perfectly, but I need to place it in the template… thanks for your help in advance
frank guillen
Agosto 23, 2008 a las 2:34 amMozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22
Thanks Fernando, something that I really need is how to have 2 lines of the post content below the title?
Thx
fernando
Agosto 23, 2008 a las 8:32 amMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
frank:
Now I get it. What you need to do is write the PHP directly into the template.
You need to do a loop for getting the categories. Change $ID for the category’s ID and $NUMBEROFPOSTS for the max number of posts you want to display:
The plugin doesn’t work if you use [catlist] on the template. Only on pages and posts. But I think this code snippet will work out for you. Tell me if it did (or didn’t).
Regards
Sam Deeks
Agosto 24, 2008 a las 11:00 amMozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16
I downloaded the plugin, activated it.
I then wrote [catlist=nameofmycategory] in my posts and pages (in the HTML editor)as the plugin text says.
Nothing. It just shows [catlist=whatever] as text on the post.
I’m WP 2.5 - any ideas why this just doesn’t work out of the box?
fernando
Agosto 24, 2008 a las 4:44 pmMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
Sam:
You have to use catlist=categoryID for now. That’s the ID, not the name of the category. I am working on a more advanced version where you’ll be able to use the name of the category. It’ll be ready soon.
Regards
Elle Fredrix
Agosto 25, 2008 a las 12:37 amMozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SU 3.005; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)
Here’s something that I found that will help the last poster… http://lepixelshoppe.com/scrap4dollars/2008/06/wordpress-25-use-category-id/
Fernando, I’ve been searching for a simple plugin like this all day. Thank you! One request. Is there any simple way to add the date of the post to the list as well?
Thanks again!
Priscilla
Agosto 25, 2008 a las 4:19 amMozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16
Oh, I was so excited about this plugin! I thought it was just what I needed, but I’ve run into a problem. I am using the plugin page-category-plus to assign categories to my pages as well as to posts (I use WP as a CMS, not only a blog) and when I activated your plugin, it lists only the posts assigned to the category in question, not pages. Would it be possible for you to edit it so it lists pages as well?
Thank you!
fernando
Agosto 25, 2008 a las 9:05 amMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
Elle:
It wouldn’t be too complicated to add the date to the list. I’ll add that as a feature too.
Priscilla:
I’ll download this plugin and check the way it assigns categories to pages. I’ll check if I can make lcp compatible with it, without breaking it for blogs not using page-category-plus.
Thanks for your comments, suggestions and requests. Keep them coming! I’m writing down every suggestion, request and coment to improve the plugin. I’ll be working on them these days.
The next version will be out soon, implementing the sidebar widget with a few options. It’ll be totally independent from the plugin itself. I’ll also try to get some “order by” options into the next release, since its one of the most popular requests.
I’m kind of overwhelmed with all the positive feedback, thanks a lot. Glad you all found the plugin useful!
jbevans
Agosto 26, 2008 a las 3:00 amMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Great plugin and perfect for what I want. Thanks for your time and effort!
jbevans
Boots
Agosto 26, 2008 a las 3:19 amMozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
Fernado -
What an excellent plugin!!! Nice job.
It fits the bill to a T for one way I will be using it.
I have a featue request or a hack request.
I’d like to have the plug-in be able to produce the cat list with interection of two categories where I’d use [catlist id=24,46] and it would show only posts that are members of both 24 and 46. If you could squeeze it in…
Best regards,
Nick
Elle Fredrix
Agosto 26, 2008 a las 6:53 pmMozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SU 3.005; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)
Great work! Thanks for the added functionality.
Now another request.
Is there any way to show the final result of the orderby list in the displayed list? For example, if I sort by the date, can the date AND the post title show? Or if I sort by author, could the output provide author PLUS post title? If it could, this plugin would be beyond perfect!
Payday is Friday, so I’ll fire off a donation for your efforts then.
Thanks again…
fernando
Agosto 26, 2008 a las 7:37 pmMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
The data of the “order by” is definitively going in at version 0.4 of List Category Posts. It will display something like:
*Post title - by Fernando
That’s when it’s ordered by author, and:
*Post title - 07/07/2008
When ordered by date. Maybe even add the option to display the author/date before or after the post title.
I’ll see what I can do about several categories, I should check if WordPress has a default for that, or should I make my own hack.
Has anyone tried the sidebar widget? I haven’t had time for testing yet. I’ll try to have it complete for the next version.
As I wrote before, all your comments and requests are being written down for me to work on them. Thanks for the feedback!
Klaas Koopman
Agosto 28, 2008 a las 8:43 amMozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1
Hi There,
I’m trying your plugin right now and it seems to be doing what it should be, but I was wondering, is it possible to get the following:
Include it in the sidebar and that i can choose that if you visit the page about fishing, people will see the headlines of the fishing news. And when they visit the page of horseriding, they see the news related to the horseriding.
If so, please let me know how I do this. Someone told me i can do it with if statements, but i’m no php expert haha
Klaas Koopman
Agosto 28, 2008 a las 8:45 amMozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1
and some other thing to my post above:
$catposts = get_posts(’category=’.$ID.”&numberposts=”.$NUMBEROFPOSTS);
Can i insert the id in there somewhere?
Cause i tried:
$catposts = get_posts(’category=’.$3.”&numberposts=”.$NUMBEROFPOSTS);
and I trieD:
$catposts = get_posts(’category=’.3.”&numberposts=”.$NUMBEROFPOSTS);
But none worked…
fernando
Agosto 30, 2008 a las 10:37 pmMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
Klaas:
The sidebar widget is still on development. You can use it with at least one category (i think), with certain parameters.
I didn’t really get what you mean with the headings of each page. You can make a new page with the Headlines of the fishing news by using [catlist name=fishing] for example, and so on with horseriding, etc.
About the code you posted, you should give $ID a value. For example:
$id=3;
$number_posts=5;
And then use them in your code.
Hope this helps.
Regards
pcngocquy
Agosto 31, 2008 a las 2:30 amMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
thanks so much, it’s so great!
tk
Septiembre 1, 2008 a las 10:58 amMozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1
Great plugin!
How can i list just the title of the category and no posts? I just want a list of categories on the page.
Also how would i include this in a template? Looks like you mention some code above so how do include this in the loop?
Thank you so much!
fernando
Septiembre 1, 2008 a las 12:50 pmMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
tk:
You can either write the code above in the sidebar file (generally sidebar.php), or use the sidebar widget included in the latest version of the plugin.
The code doesn’t go in the loop, at least not the one for the posts. It has its own loop, where you bring posts for each category.
I don’t know about listing categories, I think there already is something in WordPress to do that, but I’ll check it.
Regards
tk
Septiembre 1, 2008 a las 2:04 pmMozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1
thanks so much!!
sapien1980
Septiembre 3, 2008 a las 10:04 pmMozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
good post! thanks
gw468
Septiembre 3, 2008 a las 11:34 pmMozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16
I tried the code above that you replied to Frank and it just breaks the page. The page won’t even load.
I am trying to add this to my archive.php file. I would like to show a list of post names only, sorted ascending by name for the current category and all children categories. Is this possible? How would I code it to be included on the archive.php page? BTW, using it in a post works beautifully, so I know it is installed correctly.
Craig
Septiembre 4, 2008 a las 3:59 amMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Is there any way of adding pagination to this so that if you have 8 articles but only allow 4 per page, then there is a next button to take you to the next 4 articles.
Mike
Septiembre 4, 2008 a las 10:49 amMozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1
Great plug in! I now have it working almost perfectly.
I used the php code above in my template, at first it gave an error on this line:
result .= $single->the_excerpt.”\n”.”;
I fixed that by adding a $ at the beggining of the line and now it lists my posts perfectly but I cannot get it to show the excerpt. I have tried everything I can think of, and spent 2 hours searching the web for an answer, but no luck.
Has anyone else managed to make it show the excerpt? muchas gracias
Mike
Septiembre 4, 2008 a las 11:35 amMozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1
@tk
I almost forgot ‘wp_list_categories’ is what you are looking for.
Wardeh
Septiembre 8, 2008 a las 5:57 pmMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Hi, I am using the widget. It works right off the bat, but I would like to be able to title my list of posts in the category specified. Right now it doesn’t do any title AT ALL, not even the category name.
Thanks,
Wardeh
fernando
Septiembre 8, 2008 a las 6:25 pmMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
Wardeh:
Thanks for trying the widget. I’ll add a title on the next release.
Regards!
Mrs. Brown
Septiembre 11, 2008 a las 1:04 pmMozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.7) Gecko/20060911 Camino/1.0.3 (MultiLang)
Hi, Fernando, thank you so much for your plugin. I don’t know whether my little problem is related to the plugin or wheter its origin lies somewhere else. Anyway: I’m using this code to display the category list in the sidebar:
The list actually shows five titles but it displays titles from all categories I have, not just one category. I also tried to use the ID - with the same result. Do you have an idea what might be going wrong?
Yick
Septiembre 11, 2008 a las 2:36 pmMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16
I activated the pluggin, then I try to add the code to sidebar.php
If I add [catlist id=24] to the html, it just print [catlist id=24].
If I add [catlist id=24] inside php code, it gives me an error.
Can you show me the exact coding to add to sidebar.php?
<?php wp_list_categories(’show_count=1&title_li=Categories’); ?>
I want to achieve the following result
I see your examples but don’t know how to add the code correctly to the sidebar.php.
Pls help.
Yick
Septiembre 11, 2008 a las 2:38 pmMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16
The result I want to achieve is
(cat1)
(post1)
(post2)
(cat2)
(post1)
(post2)
(post3)
aHfUi
Septiembre 11, 2008 a las 2:45 pmMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
fernando,
how can i display unlimited for the category ?
i try to set $NUMBEROFPOSTS = “”;
but it no function …
Thanks you
fernando
Septiembre 11, 2008 a las 3:45 pmMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1
Mrs. Brown:
I had never used the do_shortcode function, but great if it works! I have no idea why it’s displaying posts from all of your categories. The ID should work as well. I think the “name” argument is actually the short url code for the category (See Manage => Categories => Your Category)
Yick:
Yeah, just adding the shortcode to html or php files won’t do it. I’ve said that on previous comments. Try the code I wrote up there for each category you want to display.
aHfUi:
Yick
Septiembre 12, 2008 a las 1:09 amMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16
Ok, thanx for your kind reply. However, it only display the post in the category, it does not display the name of the catergory.
How to display the category name and then the post in the category.
Like
(cat1)
(post1)
(post2)
(cat2)
(post1)
(post2)
Thanx a lot
Conrad Erway
Septiembre 16, 2008 a las 11:21 pmMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
I am using AStickyPostOrderER to order my posts. I order I choose does not match with any of the choices you offer in the widget. Is there a way to pick the order from what I choose in AStickyPostOrderER? With this one added feature, this is a real winner.
Also is there a way to put a title on the post lists in the sidebar widget such as you can with other widgets?
Thanks.
kirksydney
Septiembre 19, 2008 a las 4:32 amMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5
Great plug in! make some more. =)
Martino
Septiembre 19, 2008 a las 11:55 amMozilla/5.0 (Macintosh; U; Intel Mac OS X; it; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16
Hi there,
very useful plugin.
I was wondering if there is a way to have a class to display as selected the page you’re in. I mean, let’s say i’m in the home page and there is the list in the sidebar: i click a link and there i’m in the page, but the list doesn’t show that i’m already in that page.
This
is the code i need to edit. That should have a
<li class="<php if (page_is(BIG_PROBLEM))".
The BIG PROBLEM is how to tell WP to get the ID of the page i’m in so that php render the special class.
Maybe i’m not very clear, but i can explain better if anybody can help me
RiteandRitual
Septiembre 19, 2008 a las 3:48 pmMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
I’ve had a heck of a time trying to find a way to make a standard static menu as described by Yick in the comment on Septiembre 12:
(cat1)
(post1)
(post2)
(cat2)
(post1)
(post2)
… Looks like, of all the plugins for wordpress, this is the only thing that comes close to it. Great work! All you need now is to add the Category as a title and link (as above), let the user display all categories or choose which to exclude… and this will be a perfect plugin!
Right now it looks like I have to do this manually…
fernando
Septiembre 21, 2008 a las 1:42 pmMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
Thanks for all your comments. Just a quick note to let you know all your requests will be considered for the next version.
I’m running low on time recently, so as soon as I get some spare time, I’ll work on my WordPress plugins for a while.
Regards
Bob
Septiembre 23, 2008 a las 1:06 pmMozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 2.0.50727)
Awesome plugin!
I`m using several different categories on my website, and now i would like to display the last 5 posts within every category using the following code:
$result = "";
$catposts = get_posts('category='.$ID."&numberposts=".$NUMBEROFPOSTS);
foreach($catposts as $single):
$result .= "ID).”‘>”.$single->post_title.”“;
endforeach;
$result .= “”;
echo $result;
For example:
=======================================
Post in Category 1.
[text]
Last 3 posts in this category:
- post 1
- post 2
- post 3
=======================================
Post in Category 2.
[text]
Last 3 posts in this category:
- post 4
- post 5
- post 6
========================================
I want this code to be dynamic so that i dont have to change the code for every single category.
Do you have any idea how to achieve this?
TN
Septiembre 24, 2008 a las 1:58 amMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Thanks for plugin. Nice
Amanda
Octubre 3, 2008 a las 4:18 pmMozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3
I just downloaded this plugin (not for the site listed above, but for a family member’s web site), and have followed the directions in uploading the plugin, etc. (as far as I know), but when I put your code in to list posts from a category on one of the site’s pages, it displays nothing. What could I be doing wrong?
Thanks, I hope to get this working as I think this is just the plugin I’ve been looking for.
krAzykrAkr01
Octubre 4, 2008 a las 6:58 pmMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092510 Ubuntu/8.04 (hardy) Firefox/3.0.3
Great Plugin. It works perfect.
To answer a question asked above, I have found that to get a title, the easiest way is to put a h2 tag with the title above the catlist shortcode.
jG
Octubre 7, 2008 a las 6:39 amMozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
congratulations, that’s a great plugin !
I have one question for you …
I use HeadSpace2 plugin :
could you give me the code to display the meta title description despite the title_post ?
your help would be really appreciated
THANK YOU !
Upekshapriya
Octubre 10, 2008 a las 5:20 pmMozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
Very useful plugin. Just what I’ve been looking for. Thanks very much for releasing it.
However [catlist name=mycategory] doesn’t seem to be working for me, even though [catlist id=ID] is working just fine. I am using Wordpress 2.6.2.
All I get with [catlist name=mycategory] is a list of all posts of all categories.
Moondome
Octubre 15, 2008 a las 9:48 pmMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
I’m getting the same results as Upekshapriya. [catlist id=ID] works as designed (see the Berberova button on the site associated with my name above), but it would be nice to be able to use the category name.
One additional question: can this plugin be configured to display the full text of the posts instead of just the titles, the same way clicking on a given category list does?
My objective is to have a navigation button that points to such a page.
Thanks so much for your contribution to the WP community.
delbert
Octubre 17, 2008 a las 2:02 pmMozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
i’m trying to use the plug in but all i get are the most recent posts, not the most recent posts by category:
http://dudespaper.com/welcome/
Melton Cartes
Octubre 19, 2008 a las 10:57 pmMozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22
I’m having the same problem as Amanda.
I’ve added “[catlist id=3]” to a test post and a test page ([catlist id=0] too) on my Sandbox (my local version of WP and my live site and nothing shows up.
My test Page includes the resulting code without displaying text:
The test Post does the same thing.
I checked a different theme and I checked my CSS for any “hiddens” or “display:none”s and found no further clues.
Thanks for any help.
mc
Moondome
Octubre 21, 2008 a las 1:56 pmMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
In addition to the problem I mentioned a few posts above, I cannot get numberposts to work. I’ve tried 0, -1, and numbers greater or smaller than 5, but only the default five post titles appear on the page.
Currently I’m using [catlist id=4 numberposts=7].
Moondome
Octubre 21, 2008 a las 2:05 pmMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
I might also mention that for comparison, I tried the widget. It seems to work as designed, although it would be nice to have the option to title the widget.
fernando
Octubre 22, 2008 a las 12:12 amMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092816 Iceweasel/3.0.3 (Debian-3.0.3-2)
Thanks for the comments!
I’ll look up those bugs you’ve mentioned, and try to release a new version asap.
Any extra code is welcome.
Regards
aidee
Octubre 29, 2008 a las 12:24 amMozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
Hello and thanks for the plugin!
Is it possible to display posts relating to two (or more) categories i.e. posts with category ID 9 *AND* ID 13; posts marked with both these categories.
I know there is the option in Wordpress to use the following code:
query_posts(array(’category__and’=>array(9,13)));
Is it possible to use the following:
[catlist id=9&13]Thanks!
aespe
Noviembre 5, 2008 a las 10:26 amMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
Exactly just what i need, with a little modification, what i need is simply all post without grouped in categories
here is the result http://aespesoft.com/semua-artikel/
Thank you fernando
Brooke
Noviembre 7, 2008 a las 4:33 pmMozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.17) Gecko/20080829 Firefox/2.0.0.17
Is there any way to get the excerpt to show with this plugin?
Tino
Noviembre 10, 2008 a las 2:53 pmMozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.17) Gecko/20080829 Firefox/2.0.0.17
Is there a way to get the date to show after the title?
I read the previous posts. However, I was not sure if this feature has been added or not.
bill
Noviembre 11, 2008 a las 12:00 amMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
I have the same question as Brooke, can I add an excerpt using the shortcode?
Pablo
Noviembre 14, 2008 a las 4:04 pmMozilla/5.0 (Windows; U; Windows NT 6.0; es-AR; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4
Hola Fernando, la verdad que el plugin es espectacular! Felicitaciones!
Tengo una duda, ¿Es posible listar las entradas correspondientes a cada categoría una vez que estás dentro de la misma?
Digamos, si ingresas a la categoría “Juegos” que sólo aparezcan en el Sidebar las entradas que correspondan a esa categoría.
Un abrazo y mil gracias!
site
Noviembre 16, 2008 a las 9:02 amMozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; MSN Optimized;GB; MSN Optimized;GB)
Hi,
This doesn’t work for me.
I have a page. I have a category called articles, so I have inserted this into the post:
[catlist name=articles]But it displays 5 posts and not just from the artciles category but all categroies.
Help please, thanks.
clhmedia
Diciembre 3, 2008 a las 2:07 amMozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SV1; Embedded Web Browser from: http://bsalsa.com/; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)
This is exactly what i have been looking for… hope it works