Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <div id="primary" class="site-content">
- <div id="content" role="main">
- <?php while ( have_posts() ) : the_post(); ?>
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <header class="entry-header">
- <h1 class="entry-title"><?php the_title(); ?></h1>
- </header>
- <div class="entry-content">
- <?php the_content(); ?>
- <?php
- $image_id = get_post_meta($post->ID, '_book_info_cover', true);
- $image = wp_get_attachment_image_src($image_id, 'full');
- $image_src = $image[0]; ?>
- <img src="<?php echo esc_url($image_src); ?>" alt="<?php echo esc_attr(get_the_title($post->ID)); ?>" />
- <p class="entry-meta">Publié le <?php echo get_post_meta($post->ID, '_book_info_publication_date', true); ?></p>
- <?php
- $authors = get_post_meta($post->ID, '_book_info_author', true);
- foreach($authors as $author) {
- $author_data = get_post($author);
- $author_name = $author_data->post_title;
- $author_bio = $author_data->post_content;
- echo '<h4>' . $author_name . '</h4>';
- echo '<p>' . $author_bio . '</p>';
- echo '<hr>';
- } ?>
- </div><!-- .entry-content -->
- <footer class="entry-meta">
- <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
- </footer><!-- .entry-meta -->
- </article><!-- #post -->
- <nav class="nav-single">
- <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>
- <span class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '←', 'Previous post link', 'twentytwelve' ) . '</span> %title' ); ?></span>
- <span class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '→', 'Next post link', 'twentytwelve' ) . '</span>' ); ?></span>
- </nav><!-- .nav-single -->
- <?php comments_template( '', true ); ?>
- <?php endwhile; // end of the loop. ?>
- </div><!-- #content -->
- </div><!-- #primary -->
- <?php get_sidebar(); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement