• Skip to primary navigation
  • Skip to main content

Genesis Community

Resources for Genesis WordPress Theme Users

  • Facebook
  • Twitter
  • Slack
  • Wiki
  • Login
You are here: Home / Wikis / Genesis / genesis_custom_loop() example

genesis_custom_loop() example

global $paged;

// Fix for the WordPress 3.0 "paged" bug.

$paged = 1;

if ( get_query_var( 'paged' ) ) {
    $paged = get_query_var( 'paged' );
}

if ( get_query_var( 'page' ) ) {
    $paged = get_query_var( 'page' );
}

$paged = intval( $paged );

$args = array(
    'posts_per_page' => '5',
    'paged'          => $paged,
);

genesis_custom_loop( wp_parse_args( $args ) );
Notes:

See Set up custom loop in Genesis for a complete example.

Posted by: Sridhar Katakam Category: Genesis Tags: loop

« Search form input box text
Space separated post’s categories »

Copyright © 2026 · Genesis Sample on Genesis Framework · WordPress · Log in