8. Blog

[u_blog title="" post_type="" cat="" count="" order="" orderby="" meta_key="" show_date="" show_price="" show_comment_count="" show_cat_name="" more_text="" more_link="" detail_text="" column="" css_animation=""]

The [u_blog] shortcode has the following variables/options:
  1. post_type (optional) – Default ‘post’
    • post: Default post
    • u_event (custom post type)
    • u_course (custom post type)
    • u_project (custom post type)
    • attachment
  2. count (optional) – Default 4
  3. order (optional) – Default DESC
    • ASC|DESC
  4. orderby (optional) – Default DATE
    • ‘none’ – No order
    • ‘ID’ – Order by post ID. Note the captialization.
    • ‘author’ – Order by author.
    • ‘title’ – Order by title.
    • ‘name’ – Order by post name (post slug).
    • ‘date’ – Order by date.
    • ‘modified’ – Order by last modified date.
    • ‘parent’ – Order by post/page parent ID.
    • ‘rand’ – Random order.
    • ‘comment_count’ – Order by the number of comments
    • ‘menu_order’ – Order by Page Order. Used most often for Pages (Order field in the Edit Page Attributes box) and for Attachments (the integer fields in the Insert / Upload Media Gallery dialog), but could be used for any post type with distinct ‘menu_order’ values (they all default to 0).
    • ‘meta_value’ – Note that a ‘meta_key=keyname’ must also be present in the query. Note also that the sorting will be alphabetical which is fine for strings (i.e. words), but can be unexpected for numbers (e.g. 1, 3, 34, 4, 56, 6, etc, rather than 1, 3, 4, 6, 34, 56 as you might naturally expect). Use ‘meta_value_num’ instead for numeric values.
    • ‘meta_value_num’ – Order by numeric meta value (available with Version 2.8). Also note that a ‘meta_key=keyname’ must also be present in the query. This value allows for numerical sorting as noted above in ‘meta_value’.
    • ‘post__in’ – Preserve post ID order given in the post__in array
  5. meta_key (optional)
    • name of meta key for ordering
  6. show_date (optional) – Default 1/true – Show or hide published date (for post) or start-date (for course, event)
    • 1/true
    • 0/false
  7. show_price (optional) – Default 0/false – Show or hide price (for course, event)
    • 0/false
    • 1/true
  8. more_text (optional) – Default “Visit Blog”
    • If it is not set, this button will not be shown
  9. more_link (optional) – Default link to archive pages of post types
  10. detail_text (optional) – Default “Details”
    • If it is not set, this button will not be shown
  11. show_comment_count (optional) – Default “1/true”
    • 1/true
    • 0/false
  12. column (optional) – Default “1/true” – 2 columns or 1 column
    • 1/true
    • 0/false
  13. css_animation – Select types of animation for element to be animated when it “enters” the browsers viewport (Note: works only in modern browsers), with options: top-to-bottom, bottom-to-top, left-to-right, right-to-left, appear-from-center
  14. cat (optional) – List of cat ID (or slug), separated by a comma
  15. tag (optional) – List of tags, separated by a comma
  16. ids (optional) – List of post ids, separated by a comma. If this param is presented, “cats” and “tags” params are useless

shortcode_blog