Skip to content

Instantly share code, notes, and snippets.



Last active Feb 15, 2017
What would you like to do?
Crear listado de páginas hijas en genesis
// Template Name: Pages-hijas
remove_action('genesis_loop', 'genesis_do_loop');
add_action('genesis_loop', 'custom_loop');
function custom_loop() {
global $post;
$pageid = $post->ID;
$args = array(
'post_type' => 'page',
'posts_per_page' => -1,
'post_parent' => $post->ID,
'order' => 'ASC',
'orderby' => 'menu_order'
$my = new WP_Query( $args );
while ( $my->have_posts() ): $my->the_post();
global $more;
$more = 0; ?>
<div class="subpage-post">
<div class="featured-image">
<?php echo the_post_thumbnail( ‘thumbnail’ ); ?>
<h3 class="entry-title">
<a href="<?php echo the_permalink(); ?>"> <?php echo the_title(); ?></a></h3>
<div class="entry-content">
<?php echo the_excerpt(); ?>
<?php endwhile;
} ?>
<?php genesis() ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment