Description
Insert a blog post list using the blog shortcode. Add the shortcode to a page or other content area to produce a list of blog posts. Optional parameters allow customization of the display.
-
The Lysine Contingency
The lysine contingency – it’s intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can’t manufacture the amino acid lysine. Unless they’re continually supplied with lysine by us, they’ll slip into a coma and die.
Praesent non libero augue, nec feugiat turpis. Aenean euismod, orci ac bibendum ullamcorper, augue lorem tempor tellus, id rhoncus felis enim tincidunt nulla. Vestibulum quam justo, luctus sed mollis vel, ornare eget erat. Curabitur tempor, mi vehicula tristique semper, mi est adipiscing mi, ac iaculis mi nibh et lorem. Duis elit diam, vehicula id fringilla a, tincidunt ac erat. Morbi vitae lectus risus. Maecenas at nibh odio. Quisque ut ante sit amet orci sagittis interdum. Duis congue, nisl sed tincidunt molestie, nibh orci porta lectus, at euismod libero diam non diam. Vivamus vehicula felis a massa fringilla dignissim. Vestibulum ac risus odio, sit amet tempor lectus. Ut ornare nisi feugiat enim imperdiet congue ultricies nisi blandit.
Praesent luctus aliquam nibh, eu convallis sapien consectetur ac. Donec eu augue eget magna condimentum mollis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Mauris a euismod ante. Nam a est erat, a facilisis mauris. Sed elit ante, congue at dignissim id, pretium ac sem. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus malesuada magna sit amet orci adipiscing id dignissim tortor ultricies. Quisque sit amet lacinia augue. Integer ullamcorper pulvinar libero, et aliquet arcu tempus in. Morbi bibendum, nulla eget iaculis dapibus, odio quam consequat sapien, ut pretium velit nunc id mi. Suspendisse at posuere nunc. Donec fermentum ornare blandit. Nam risus odio, rhoncus vel interdum in, adipiscing et sem. Nam mattis odio porta leo varius dignissim.
Example shortcode:
[blog category="1" posts_per_page="2" paging="false" image_width="450" image_height="125" excerpt_length="-1" read_more="-1" orderby="rand"]
Default Usage
[blog]
Blog from Categories
[blog category="7,8,9"]
Parameters
- category
- (string) The category ID’s to pull posts from. Can be entered as a comma separated list.
- images
- (bool) (Optional) Show featured image in blog list. (true/false)
- image_width
- (integer) (Optional) The featured image height. Set to “0” for auto.
- image_height
- (integer) (Optional) The featured image width. Set to “0” for auto.
- post_content
- (string) (Optional) Display excerpt or full post. Values: excerpt, full
- excerpt_length
- (integer) (Optional) The length of the excerpt, number of words to display. Set to “-1″ for no excerpt.
- show_date
- (bool) (Optional) Show or hide the post date. (true/false)
- author_avatar
- (bool) (Optional) Show or hide the author avatar image. (true/false)
- author_link
- (bool) (Optional) Show or hide the author name and link. (true/false)
- comments_link
- (bool) (Optional) Show or hide the comments link. (true/false)
- show_category_list
- (bool) (Optional) Show or hide the list of categories assigned to the post. (true/false)
- show_tag_list
- (bool) (Optional) Show or hide the list of tags assigned to the post. (true/false)
- posts_per_page
- (integer) (Optional) The number of posts to display on each page.
- paging
- (bool) (Optional) Enable paging. (true/false)
- read_more
- (string) (Optional) Shows entered text at the end of the excerpt linking to full post. For example: read_more=”More…”
Examples
Posts from categories with paging and post details:
[blog category="7,8,9" author_avatar="true" show_date="true" paging="true"]
Posts from categories, full post no images:
[blog category="7,8,9" post_content="full" images="false"]
Blog from Pages
Blogs may also be generated from pages using a list of page ID’s or the child pages from a parent page ID.
Page Parameters
- post_type
- (string) (Required) Directs the query to use pages instead of posts. Must include the value “page”.
- page_id
- (string) The page ID’s to include. Can be entered as a comma separated list.
- post_parent
- (integer) (Optional) Show child pages of the selected parent. Similar to using a category for posts.
Examples
Pages from list of page ID’s:
[blog post_type="page" page_id="10,11,12"]
Child pages from parent page ID:
[blog post_type="page" post_parent="9"]
Order and Orderby Parameters
- order
- (string) (Optional) Designates the ascending or descending order of the “orderby” parameter.
- “ASC” – ascending order from lowest to highest values (1, 2, 3; a, b, c).
- “DESC” – descending order from highest to lowest values (3, 2, 1; c, b, a).
- orderby
- (string) (Optional) Sort posts by.
- ‘none’ – No order.
- ‘id’ – Order by post id.
- ‘author’ – Order by author.
- ‘title’ – Order by title.
- ‘date’ – Order by date. (default)
- ‘modified’ – Order by last modified date.
- ‘parent’ – Order by post/page parent id.
- ‘rand’ – Random order.
- ‘comment_count’ – Order by number of comments
- ‘menu_order’ – Order by Page Order.
Examples
Display random posts:
[blog category="8" orderby="rand"]
Display popular posts:
[blog category="8" orderby="comment_count"]
Additional blog information available on the blog information page »