Emerson comes with a number of shortcodes to display custom post type loops. Basically a feed of various post types from specified taxonomies. So much like the blog module, but not limited to posts.


Recent Content Feed


Shortcode: [showrecentcontent]



Attributes:


  • showposts = Number of posts to display
  • type = Post types and custom post types to display
  • category = Categories to display
  • pagination =  Turn pagination on or off
  • order = Display order



Parameters: 


  • showposts = Posts per page. Numerical value e.g. 6.
  • type = Comma seperated list e.g. post,project,event.
  • category = Comma seperated list of category slugs e.g. design,photography,members-only
  • pagination = true or false
  • order = Order of posts ASC or DESC.



Example:


[showrecentcontent showposts="6" type="event,post" category="live-training,design" pagination="false" order="DESC"]


The above shortcode will display 6 posts from the event custom post type and the standard posts, from the live training and design categories, pagination is switched off and the posts will be displayed in descending order.




Events Feed


Shortcode: [showevents]



Attributes:


  • showposts = Posts per page. Numerical value e.g. 6.
  • upcoming = Display only future events or all events
  • pagination =  Turn pagination on or off
  • order = Display order



Parameters: 


  • showposts = Posts per page. Numerical value e.g. 6.
  • upcoming = true or false
  • pagination = true or false
  • order = Order of posts ASC or DESC.



Example:


[showevents showposts="4" upcoming="true" pagination="false" order="ASC"]


The above shortcode will display 4 posts, only future events, pagination is switched off and the posts will be displayed in ascending order.




Content Library Feed


Shortcode: [showcontentlibrary]



Attributes:


  • showposts = Number of posts to display
  • type = Post types and custom post types to display
  • category = Categories to display
  • pagination =  Turn pagination on or off
  • order = Display order



Parameters: 


  • showposts = Posts per page. Numerical value e.g. 6.
  • type = Comma seperated list e.g. post,project,event.
  • category = Comma seperated list of category slugs e.g. design,photography,members-only
  • pagination = true or false
  • order = Order of posts ASC or DESC.



Example:


[showcontentlibrary showposts="9" type="project,post,event" category="live-training,design,photography" pagination="true" order="DESC"]


The above shortcode will display 9 posts from the projects, standard posts and the event custom post type, from the live training, design and photography categories, pagination is switched on and the posts will be displayed in descending order.