Usage:
This shortcode provides the ability to display a certain number of “related” posts based on post category.
This shortcode does NOT supports conditional branching with [ELSE_related_posts].
Shortcode nesting is NOT supported.
Parameters:
cat | The category or categories to be used to select “related” posts. If more than one category is defined, the list should be comma-separated. Required: Yes. |
limit | Defines the number of related posts to retrieve and display. Required: No. Default: 5. |
display | Defines what to display. There are two valid values: ‘title’ (default), which displays only the titles of the related posts and ‘title_excerpt’, which displays both the title and an excerpt of the related posts. Required: No. Default: ‘title’. |
excerpt_len | Defines the length of the post excerpts. Required: No. Default: As set in “Plugin Options” |
Example:
[i4w_related_posts cat='72' limit='10']
[i4w_related_posts cat='72' limit='10' display='title_excerpt' excerpt_len='55']
API:
To use this shortcode in your own PHP code, please use as follows:
'123,234', 'limit'=>5, 'display'=>'title', 'excerpt_len'=>0 ) ); ?>