Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (29 sloc) 762 Bytes
<snippet>
<content><![CDATA[
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', '${1:prefix}_do_loop' );
/**
* Outputs a custom loop
*
* @global mixed \$paged current page number if paginated
* @return void
*/
function ${1:prefix}_do_loop() {
global \$paged;
// accepts any wp_query args
\$args = (array(
${2:'post_type' => '',
'category_name' => 'blog', // use category slug
'order' => 'ASC',
'order_by' => 'title',
'paged' => \$paged,
'posts_per_page' => 5}
));
genesis_custom_loop( \$args );
}
genesis();
]]></content>
<tabTrigger>gcl</tabTrigger>
<scope>source.php,source.php.embedded.block.html</scope>
<description>Setup genesis custom loop</description>
</snippet>