3. Post Carousel
[u_post_carousel post_type="" cat="" count="" visible="" order="" orderby="" meta_key="" show_date="" show_price="" show_venue="" show_time=""]
The [u_post_carousel] shortcode has the following variables/options:
- post_type (optional) – default ‘post’
- post: default post
- u_event (custom post type)
- u_course (custom post type)
- u_project (custom post type)
- cat (optional): ID or slug of categories. Separated by a comma. Ex. 1,2,3,4
- tag (optional): tags list. Separated by a comma. Ex. Tag1, tag2, tag3
- ids (optional): IDs of posts. Separated by a comma. Ex. 1, 2, 3, 4
- count (optional) – Default 4
- visible (optional): Number of visible items. Default: 4
- order (optional) – Default DESC (ASC|DESC)
- 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 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
- ‘Start date, Upcoming Event or Course’ – Display the upcoming Events/Course based on Start Date. Arranged by chronological order of the upcoming events/courses
- ‘Start date, Recent Event or Course’ – Display the recent Events/Course based on Start Date. Arranged by chronological order of the recent events/courses
- meta_key (optional): Name of meta key for ordering
- show_date (optional): Show date info. With standard posts, this is Published Date. With Event and Course, this is Start Date
- show_price (optional): Show price info. Only works with Event post type
- show_venue (optional): Show venue info. Only works with Event & Course post type
- show_time (optional): Show start time. Only works with Event & Course post type