Skip to content

Instantly share code, notes, and snippets.

@om4james
Created October 5, 2011 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save om4james/1263950 to your computer and use it in GitHub Desktop.
Save om4james/1263950 to your computer and use it in GitHub Desktop.
Mini Loops Example: 2 recent posts displayed on home page
[miniloop number_posts=2]
<li>
<h2>{title}</h2>
{image from=thumb width=75 height=75 class=alignleft}{ml_excerpt wlength=35 up_to_more=1 after=More... space_between=1}</li>
[/miniloop]
@trepmal
Copy link

trepmal commented Jan 6, 2012

If you find that the markup is unpredictable when using the [miniloop] shortcode, check out the ml_format that was introduced in v0.9.

@om4james
Copy link
Author

om4james commented Jan 9, 2012

Thanks Kailey. Placing the miniloops shortcodes in a post snippet (using the Post Snippets plugin) helps keep the visual editor nice and tidy too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment