18Tem

wordpresste categoriye göre yazı gruplamak

WordPress te sayfalar halinde yazılarınızı gruplayıp sayfalarda listelemek için mükemmel ve çok kolay bir eklenti.

List category posts

List Category Posts allows you to list posts from a category into a post/page using the [catlist] shortcode. This shortcode accepts a category name or

Other notes

Usage 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]. You can include several categories: Ex: [catlist id=17,24,32] orexclude a category with the minus (-) If you use both arguments (wrong!), List Category Posts will show the posts from the category in 'name'.
  • tags - Tag support, you can display posts from a certain tag.
  • 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]
  • date - Display post's date next to the title. Default is 'no', use date=yes to activate it.
  • author - Display the post's author next to the title. Default is 'no', use author=yes to activate it.
  • dateformat - Format of the date output. Default is get_option('date_format'). Checkhttp://codex.wordpress.org/Formatting_Date_and_Time for possible formats.
  • template - File name of template from templates directory without extension. Example: For 'template.php' value is only 'template'. Default is 'default', which displays an unordered list (ul html tag) with a CSS class. This class can be passed as a parameter or by default it's: 'lcp_catlist'. You can also use the default 'div' value. This will output a div with the 'lcp_catlist' CSS class (or one you pass as parameter with the class argument). The inner items (posts) will be displayed between p tags.
  • excerpt - Display the post's excerpt. Default is 'no', use excerpt=yes to activate it.
  • excludeposts - IDs of posts to exclude from the list. Ex: [catlist excludeposts=12,52,37]
  • 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.
  • content - Show the full content of the post. Default is 'no'. Ex: [catlist content=yes]
  • catlink - Show the title of the category with a link to the category. Use the template system to customize its display using the variable $cat_link_string. Default is 'no'. Ex: [catlist catlink=yes]. The way it's programmed, it should only display the title for the first category you chose, and include the posts from all of the categories. I thought of this parameter mostly for using several shortcodes on one page or post, so that each group of posts would have the title of that group's category. If you need to display several titles with posts, you should use one [catlist] shortcode for each category you want to display.
  • comments - Show comments count for each post. Default is 'no'. Ex: [catlist comments=yes].
  • thumbnail - Show post thumbnail (http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/). Default is 'no'. Ex: [catlist thumbnail=yes].
  • post_type - The type of post to show. Available options are: post - Default, page, attachment, any - all post types.
  • post_parent - Show only the children of the post with this ID. Default: None.
  • class - CSS class for the default UL generated by the plugin.
  • 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.
  • customfield_display - Display custom field(s). You can specify many fields to show, separating them with a coma.
Your comments and feedback are welcome at: http://foro.picandocodigo.net/categories/list-category-posts New Code is welcome too 😀
Share this Story

About AlpOcal

1.250 comments

© Copyright 2013, All Rights Reserved - Alp Ocal - RSS: www.alpocal.com/feed/