Completed
Push — master ( 7984ea...f8c9c5 )
by SILENT
02:05 queued 11s
created

archive-comic.php (4 issues)

Labels
Severity
1
<?php
2
/**
3
 * Template Name: Archive all comics
4
 *
5
 * The template for displaying comic Archives pages
6
 * An overview to peruse all stories — has links to custom comic posts in a second loop
7
 *
8
 * @package WordPress
9
 * @subpackage Strip
10
 */
11
12
get_header(); ?>
13
	<section id="primary"
14
		<main id="content" role="main">
15
16
			<?php if ( have_posts() ) : ?>
17
18
				<header class="page-header">
19
					<h1 class="page-title">
20
						<?php
21
							printf(
22
								esc_html( 'STORIES %s', 'strip' ), '<span>' .
23
								single_cat_title( '', false ) . '</span>'
24
							);
25
						?>
26
					</h1>
27
28
					<h3 class="taxonomy-description">
29
						<a href="<?php echo esc_url( home_url( '/series/' ) ); ?>">
0 ignored issues
show
The function esc_url was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

29
						<a href="<?php echo /** @scrutinizer ignore-call */ esc_url( home_url( '/series/' ) ); ?>">
Loading history...
The function home_url was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

29
						<a href="<?php echo esc_url( /** @scrutinizer ignore-call */ home_url( '/series/' ) ); ?>">
Loading history...
30
						<?php '<span class="meta-nav"' . printf( esc_html_e( 'Series', 'strip' ) ) . '</span>'; ?>
0 ignored issues
show
The function esc_html_e was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

30
						<?php '<span class="meta-nav"' . printf( /** @scrutinizer ignore-call */ esc_html_e( 'Series', 'strip' ) ) . '</span>'; ?>
Loading history...
31
						</a>
32
					</h3>
33
34
					<h4 class="series-title">
35
					<a href="<?php echo esc_url( home_url( '/story/exile/' ) ); ?>">ExIle</a></h4>
36
					<h4 class="series-title">
37
					<a href="<?php echo esc_url( home_url( '/story/tofu/' ) ); ?>">Morning Tofu Chase</a></h4>
38
					<h3 class="series-title">
39
					<a href="<?php echo esc_url( home_url( '/story/sentient-drone/' ) ); ?>">Sentient Drone</a></h3>
40
41
				<?php
42
					// Show an optional term description.
43
					$term_description = term_description();
44
				if ( ! empty( $term_description ) ) :
45
					'<div class="taxonomy-description"' . printf( esc_html( '%s', $term_description ) ) . '</div>';
46
				endif;
47
				?>
48
			</header><!-- .page-header -->
49
50
<?php
51
	// Create and run first loop in reverse order.
52
	$comic = new WP_Query();
53
	$comic = new WP_Query(
54
		array(
55
					'post_type'      => 'comic',
56
					'posts_per_page' => 12, // optional, changes default Blog pages number set in "reading settings" dashboard.
57
					'paged'          => $paged,
58
					'orderby'        => 'title',
59
					'order'          => 'DESC',
60
		)
61
	);
62
63
while ( $comic->have_posts() ) : $comic->the_post();
64
	get_template_part( 'content-comic' );
65
	// change to 'content' to style it like the blog entry page.
66
		?>
67
	<?php endwhile;
68
						wp_reset_postdata(); ?>
69
70
						<div class="wrap">
71
								<?php the_posts_pagination(); ?>
0 ignored issues
show
The function the_posts_pagination was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

71
								<?php /** @scrutinizer ignore-call */ the_posts_pagination(); ?>
Loading history...
72
				</div>
73
74
	<?php else : ?>
75
76
	<?php get_template_part( 'no-results', 'archive-comic' ); ?>
77
78
	<?php endif;
79
			wp_reset_postdata(); ?>
80
81
		</main><!-- #content -->
82
	</section><!-- #primary -->
83
84
<?php get_sidebar(); ?>
85
<?php get_footer(); ?>
86