-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive-book.php
57 lines (55 loc) · 2.38 KB
/
archive-book.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* The template for displaying All of DIN Books.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package dawahinstitute
*/
get_header(); ?>
<div class="container">
<!-- <div id="primary" class="content-area"> -->
<main id="main" class="site-main col-xs-12" role="main">
<div class="row">
<div class="col-xs-12 m-t-3">
<?php if (is_post_type_archive()) : ?>
<h1><?php post_type_archive_title(); ?></h1>
<?php endif; ?>
</div>
</div>
<hr>
<div class="home-top row">
<?php
if ( have_posts() ) : while ( have_posts() ) : the_post();
if(have_rows('book') ) : ?>
<?php while( have_rows('book') ) : the_row(); ?>
<?php if( get_row_layout() == 'book_identity' ) : ?>
<div class="col-sm-4 book-card">
<div class="row">
<div class="col-md-4">
<img class="book-cover" src="<?php the_sub_field('book_cover_image'); ?>" alt="<?php the_sub_field('book_cover_image'); ?>">
</div>
<div class="col-md-8">
<h1 class="h5">
<a href="<?php the_permalink(); ?>" title="<?php the_sub_field('book_title'); ?>"><?php the_sub_field('book_title'); ?></a>
</h1>
<p><?php the_sub_field('book_sub_title'); ?></p>
<button class="btn btn-danger book-button">
<a href="<?php the_permalink(); ?>">Read the Book</a>
</button>
</div>
</div>
</div>
<?php endif; endwhile; ?>
<?php endif; ?>
<?php
previous_posts_link('Previous', $query->max_num_pages);
next_posts_link('Next', $query->max_num_pages);
?>
<?php endwhile; endif; ?>
</div>
</main><!-- #main -->
</div>
<!-- .container -->
<!-- </div> #primary -->
<?php get_footer();