<?php
$product_pages_args = array(
'meta_key' => '_wp_page_template',
'meta_value' => 'page_library_html_content.php',
'hierarchical' => '0'
);
$product_pages = get_pages( $product_pages_args );
?>
<?php
foreach ( $product_pages as $product_page ) {
$author_id = get_post_field('post_author', $product_page->ID );
$author_details = get_user_by( 'id', $author_id );
$author_name = $author_details->first_name . ' ' . $author_details->last_name;
echo '<div id="posts" class="flex_100">';
echo '<div id="library_title"><a href="' . get_permalink( $product_page->ID ) . '">' . $product_page->post_title . '</a></div>';
echo '<div class="library-content">' . get_post_field('post_content', $product_page->ID ) . '</div>';
echo '<div class="library-author">' . $author_name . '</div>';
echo get_avatar( $author_id , 32 );
echo '</div>';
}
?>