You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should fix issues with tags when using more than one tag for OR and AND relationships.
Documented the use of custom taxonomies. For some reason I never came around to do that. I changed the parameters for taxonomies, it used the 'tags' parameter for 'terms' before, so I added a 'terms' parameter to make this independent from the tags parameter. So now it looks like this: `[catlist taxonomy='person' terms='bob']`. This might break some current uses of taxonomy, but since it was written so long ago and I don't know why it used "tags", I decided to just create the 'terms' parameter. People using the custom taxonomies were people who are looking at the code anyway since I can't find it documented anywhere. Sorry for the inconveniences!
Description: List Category Posts allows you to list posts by category in 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, the number of posts to display and many more parameters. You can use [catlist] as many times as needed with different arguments. Usage: [catlist argument1=value1 argument2=value2].
@@ -110,6 +110,54 @@ When using List Category Posts whithout a category id, name or slug, it will pos
110
110
* Posts from several categories with an **OR** relationship, posts that belong to any of the listed categories: `[catlist id=17,24,32]` - `[catlist name=sega,nintendo]`.
111
111
* **Exclude** a category with the minus sign (-): `[catlist id=11,-32,16]`, `[catlist id=1+2-3]`. **Important**: When using the *and* relationship, you should write the categories you want to include first, and then the ones you want to exclude. So `[catlist id=1+2-3]` will work, but `[catlist id=1+2-3+4]` won't.
112
112
113
+
==Other ways of selecting what posts to show==
114
+
115
+
* **author_posts** - Get posts by author. Use 'user_nicename' (NOT
* **tags** - Tag support, display posts from a certain tag. You can use an "OR" relationship `[catlist tags="nintendo,sega"]` or "AND" relationship (posts that belong to all of the listed tags): `[catilst tags="nintendo+sega"]`.
119
+
120
+
* **taxonomy** - You can select posts using custom taxonomies. You need to set the taxonomy and the terms: `[catlist taxonomy='person' terms='bob']`.
121
+
122
+
* **currenttags** - Display posts from the current post's tags (won't
123
+
work on pages since they have no tags). Pass it the 'yes' string for it to work: `[catlist currenttags="yes"]`
124
+
125
+
* **exclude_tags** - Exclude posts from one or more tags: `[catlist tags="videogames" exclude_tags="sega,sony"]`
126
+
127
+
* **starting_with** - Get posts whose title starts with a certain
128
+
letter. Example: `[catlist starting_with="l"]` will list all posts
129
+
whose title starts with L. You can use several letters: `[catlist starting_with="m,o,t"]`.
130
+
131
+
* **monthnum** and **year** - List posts from a certain year or month. You can use these together or independently. Example: `[catlist year=2015]` will list posts from the year 2015. `[catlist monthnum=8]` will list posts published in August of every year. `[catlist year=2012 monthnum=12]` will list posts from December 2012.
132
+
133
+
* **search** - List posts that match a search term. `[catlist search="The Cake is a lie"]`
134
+
135
+
* **excludeposts** - IDs of posts to exclude from the list. Use 'this' to exclude the current post. Ex: `[catlist excludeposts=this,12,52,37]`
136
+
137
+
* **offset** - You can displace or pass over one or more initial posts which would normally be collected by your query through the use of the offset parameter.
138
+
139
+
* **post_type** - The type of post to show. Available options are: post - Default, page, attachment, any - all post types. You can use several types, example: `[catlist post_type="page,post" numberposts=-1]`
140
+
141
+
* **post_status** - use post status, default value is 'publish'. Valid values:
142
+
* **publish** - a published post or page.
143
+
* **pending** - post is pending review.
144
+
* **draft** - a post in draft status.
145
+
* **auto-draft** - a newly created post, with no content.
146
+
* **future** - a post to publish in the future.
147
+
* **private** - not visible to users who are not logged in.
148
+
* **inherit** - a revision. see get_children.
149
+
* **trash** - post is in trashbin (available with Version 2.9).
150
+
* **any** - retrieves any status except those from post types with 'exclude_from_search' set to true.
151
+
You can use several post statuses. Example: `[catlist post_status="future, publish" excludeposts=this]`
152
+
153
+
* **show_protected** - Show posts protected by password. By default
154
+
they are not displayed. Use: `[catlist show_protected=yes]`
155
+
156
+
* **post_parent** - Show only the children of the post with this ID.
157
+
Default: None.
158
+
159
+
* **custom fields** - To use custom fields, you must specify two values: customfield_name and customfield_value. Using this only show posts that contain a custom field with this name and value. Both parameters must be defined, or neither will work.
160
+
113
161
==PAGINATION==
114
162
115
163
To use pagination, you need to set the following parameters in the shortcode:
@@ -164,16 +212,6 @@ update the plugin.
164
212
* **conditional_title_class** - Specify the class used for the conditional
165
213
title. Defaults to the empty string (no special class).
166
214
167
-
* **author_posts** - Get posts by author. Use 'user_nicename' (NOT
* **starting_with** - Get posts whose title starts with a certain
201
-
letter. Example: `[catlist starting_with="l"]` will list all posts
202
-
whose title starts with L. You can use several letters: `[catlist starting_with="m,o,t"]`.
203
-
204
238
* **numberposts** - Number of posts to return. Set to 0 to use the max
205
239
number of posts per page. Set to -1 to remove the limit.
206
240
Ex: `[catlist name=mycategory numberposts=10]`
@@ -211,10 +245,6 @@ update the plugin.
211
245
don't specify it, nothing will get displayed where the posts
212
246
should be.
213
247
214
-
* **monthnum** and **year** - List posts from a certain year or month. You can use these together or independently. Example: `[catlist year=2015]` will list posts from the year 2015. `[catlist monthnum=8]` will list posts published in August of every year. `[catlist year=2012 monthnum=12]` will list posts from December 2012.
215
-
216
-
* **search** - List posts that match a search term. `[catlist search="The Cake is a lie"]`
217
-
218
248
* **date** - Display post's date next to the title. Default is 'no',
219
249
use date=yes to activate it. You can set a css class and an html
220
250
tag to wrap the date in with `date_class` and `date_tag` (see HTML
@@ -255,10 +285,6 @@ update the plugin.
255
285
`[catlist id=2 title_limit=50]` will show only the first 50
256
286
characters of the title and add "…" at the end.
257
287
258
-
* **excludeposts** - IDs of posts to exclude from the list. Use 'this' to exclude the current post. Ex: `[catlist excludeposts=this,12,52,37]`
259
-
260
-
* **offset** - You can displace or pass over one or more initial posts which would normally be collected by your query through the use of the offset parameter.
261
-
262
288
* **content** - **WARNING**: If you want to show the content on your listed posts, you might want to do this from a new [Page Template](http://codex.wordpress.org/Page_Templates) or a [Custom Post Type](http://codex.wordpress.org/Post_Types#Custom_Post_Type_Templates) template. Using this parameter is discouraged, you can have memory issues as well as infinite loop situations when you're displaying a post that's using List Category Posts. You have been warned. Usage:
263
289
264
290
Show the excerpt or full content of the post. If there's a <!--more--> tag in the post, then it will behave just as WordPress does: only show the content previous to the more tag. Default is 'no'. Ex: `[catlist content=yes]`
@@ -279,26 +305,6 @@ Show the full content of the post regardless of whether there is a <!--more--
279
305
280
306
* **thumbnail_class** - Set a CSS class for the thumbnail.
281
307
282
-
* **post_type** - The type of post to show. Available options are: post - Default, page, attachment, any - all post types. You can use several types, example: `[catlist post_type="page,post" numberposts=-1]`
283
-
284
-
* **post_status** - use post status, default value is 'publish'. Valid values:
285
-
* **publish** - a published post or page.
286
-
* **pending** - post is pending review.
287
-
* **draft** - a post in draft status.
288
-
* **auto-draft** - a newly created post, with no content.
289
-
* **future** - a post to publish in the future.
290
-
* **private** - not visible to users who are not logged in.
291
-
* **inherit** - a revision. see get_children.
292
-
* **trash** - post is in trashbin (available with Version 2.9).
293
-
* **any** - retrieves any status except those from post types with 'exclude_from_search' set to true.
294
-
You can use several post statuses. Example: `[catlist post_status="future, publish" excludeposts=this]`
295
-
296
-
* **show_protected** - Show posts protected by password. By default
297
-
they are not displayed. Use: `[catlist show_protected=yes]`
298
-
299
-
* **post_parent** - Show only the children of the post with this ID.
300
-
Default: None.
301
-
302
308
* **post_suffix** - Pass a String to this parameter to display this
303
309
String after every post title.
304
310
Ex: `[catlist numberposts=-1
@@ -314,8 +320,6 @@ Show the full content of the post regardless of whether there is a <!--more--
314
320
315
321
* **class** - CSS class for the default UL generated by the plugin.
316
322
317
-
* **custom fields** - To use custom fields, you must specify two values: customfield_name and customfield_value. Using this only show posts that contain a custom field with this name and value. Both parameters must be defined, or neither will work.
318
-
319
323
* **customfield_display** - Display custom field(s). You can specify
320
324
many fields to show, separating them with a coma. If you want to
321
325
display just the value and not the name of the custom field, use
0 commit comments