Im using a plugin to create slides, and typically you have a structure where a parentpage with vertical slides is defined by a class, and then a child inside that container is defined by another class to create horizontal slides inside the parentage. This is how the structure is needed for this work:
<div class="section">
<div class="slide"> Slide 1 </div>
<div class="slide"> Slide 2 </div>
<div class="slide"> Slide 3 </div>
<div class="slide"> Slide 4 </div>
</div>
however, I'm implanting this to wordpress and have a loop that creates vertical slides from pages automatically, but this makes horizontal pages trickier.
So i wonder if i can make a loop that creates the needed htmlstructure, and maybe a subquery? to put a class on child pages and place them in the parent container?
`if (($locations = get_nav_menu_locations()) && $locations['main-nav'] ) { $menu = wp_get_nav_menu_object( $locations['main-nav'] ); $menu_items = wp_get_nav_menu_items($menu->term_id); $pageID = array(); foreach($menu_items as $item) { if($item->object == 'page') $pageID[] = $item->object_id;
}
query_posts( array( 'post_type' => 'page','post__in' => $pageID, 'posts_per_page' => count($pageID), 'orderby' => 'post__in' ) );
} while(have_posts() ) : the_post();
?>
post_name;?>" class="section"> --> post_name;?>" class="section" data-anchor="post_name;?>">`