Skip to content

Instantly share code, notes, and snippets.

@clarklab
Created October 29, 2012 20:49
Show Gist options
  • Save clarklab/3976451 to your computer and use it in GitHub Desktop.
Save clarklab/3976451 to your computer and use it in GitHub Desktop.
WP_Query snippet for Sublime Text 2
<snippet>
<content><![CDATA[
\$${1:query} = new WP_Query('${2:posts_per_page=5}');
while (\$${1:query}->have_posts()) : \$${1:query}->the_post();
${3:// do something}
endwhile;
]]></content>
<tabTrigger>wpq</tabTrigger>
<scope>source.php</scope>
<description>WP_Query basic loop</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment