Widgets → Posts
This one is a “Recent Posts” replacement, but with massive configuration options. An advanced overview of some of the settings (the others are self-explanatory):
- Order by
- Posts are ordered by this field. This option also decides what tab icon to display, if used within tabbed widgets. Note that random-ordered posts cannot be cached, so each page load will perform a new database query.
- Show posts from
- Category from which to pull out posts. This option is only valid for the “post” post-type.
- Context has max. [] words
- Only relevant if the {CONTENT} keyword is present. This filters out any unwanted HTML (block-level elements are stripped out) and trims the content to the number of words you specify. You can control which tags are allowed, or the “[…]” text, trough setContextArgs():
$app->setContextArgs('widget_posts_defaults', array( 'allowed_tags' => 'abbr,strong,etc', 'content_filter_more' => '(more...)' ) );
- Thumbnail Size
- The width and height of the thumbnails, if {THUMBNAIL} is present. Since this requires the requested post thumbnail size to exist, missing sizes will trigger auto-regeneration (if enabled from the Advanced theme settings).
- Display show more link
- If checked, it will append a link after the list which can pull out more posts in the background. Requires jQuery to be enabled since it uses AJAX to make the request.
- Get only context-related posts
- Forces the widget to request only posts that are tag-related to the current post that’s being viewed. By checking this option, you’re basically hiding the widget from all pages except the single post pages. Also, if no related posts are found, the widget will not show up.
Template Keywords
- {TITLE}
- Post title.
- {COMMENT_COUNT}
- Number of comments that the post has.
- {THUMBNAIL}
- Post thumbnail image.
- {URL}
- Permalink.
- {CONTENT}
- Content of the post.
- {EXCERPT}
- Excerpt of the post (Content with HTML tags stripped out).
- {DATE}
- Relative published post date.
- {AUTHOR}
- Name of the post author.
- {VIEWS}
- Number of post views (Relies on the “views” meta key).
- {CATEGORIES}
- Categories, separated with commas.
- {TAGS}
- Post tags, separated with commas.
- {INDEX}
- Number of the post in the list.
- {ID}
- Database ID of the post.
Extra site-wide Keywords
- {BLOG_NAME}
- Name of the blog from which the post is part of.
- {BLOG_URL}
- Address to that blog.
- {BLOG_POST_COUNT}
- Number of posts that the blog has.
- {BLOG_ID}
- ID of the blog.
You can always suggest new keywords to add, just post a comment below
Last revision 12 years