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(); ?> |
||||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||||
13 | <section id="primary" |
||||||
14 | <main id="content" role="main"> |
||||||
15 | |||||||
16 | <?php if ( have_posts() ) : ?> |
||||||
0 ignored issues
–
show
The function
have_posts 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
![]() |
|||||||
17 | |||||||
18 | <header class="page-header"> |
||||||
19 | <h1 class="page-title"> |
||||||
20 | <?php |
||||||
21 | printf( |
||||||
22 | esc_html( 'STORIES %s', 'strip' ), '<span>' . |
||||||
0 ignored issues
–
show
The function
esc_html 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
![]() |
|||||||
23 | single_cat_title( '', false ) . '</span>' |
||||||
0 ignored issues
–
show
The function
single_cat_title 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
![]() |
|||||||
24 | ); |
||||||
25 | ?> |
||||||
26 | </h1> |
||||||
27 | |||||||
28 | <?php |
||||||
29 | // Show an optional term description. |
||||||
30 | $term_description = term_description(); |
||||||
0 ignored issues
–
show
The function
term_description 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
![]() |
|||||||
31 | if ( ! empty( $term_description ) ) : |
||||||
32 | '<div class="taxonomy-description"' . printf( esc_html( '%s', $term_description ) ) . '</div>'; |
||||||
33 | endif; |
||||||
34 | ?> |
||||||
35 | </header><!-- .page-header --> |
||||||
36 | |||||||
37 | <?php |
||||||
38 | // Create and run first loop in reverse order. |
||||||
39 | $comic = new WP_Query(); |
||||||
0 ignored issues
–
show
The type
WP_Query was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||||
40 | $comic = new WP_Query( |
||||||
41 | array( |
||||||
42 | 'post_type' => 'comic', |
||||||
43 | 'posts_per_page' => 12, // optional, changes default Blog pages number "reading settings" set in dashboard. |
||||||
44 | 'paged' => $paged, |
||||||
45 | 'orderby' => 'title', |
||||||
46 | 'order' => 'DESC', |
||||||
47 | ) |
||||||
48 | ); |
||||||
49 | |||||||
50 | while ( $comic->have_posts() ) : $comic->the_post(); |
||||||
51 | get_template_part( 'content-comic' ); |
||||||
0 ignored issues
–
show
The function
get_template_part 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
![]() |
|||||||
52 | // change to 'content' to style it like the blog entry page. |
||||||
53 | ?> |
||||||
54 | <?php endwhile; |
||||||
55 | wp_reset_postdata(); ?> |
||||||
0 ignored issues
–
show
The function
wp_reset_postdata 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
![]() |
|||||||
56 | |||||||
57 | <div class="wrap"> |
||||||
58 | <?php the_posts_pagination( array( |
||||||
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
![]() |
|||||||
59 | 'prev_text' => _x( '←', 'Previous page link', 'strip' ) . '<span class="screen-reader-text">' . __( 'Previous page', 'strip' ) . '</span>', |
||||||
0 ignored issues
–
show
The function
_x 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
![]() The function
__ 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
![]() |
|||||||
60 | 'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'strip' ) . '</span>' . _x( '→', 'Next post link', 'strip' ), |
||||||
0 ignored issues
–
show
|
|||||||
61 | 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'strip' ) . ' </span>', |
||||||
0 ignored issues
–
show
|
|||||||
62 | ) ); ?> |
||||||
63 | </div> |
||||||
64 | |||||||
65 | <?php else : ?> |
||||||
66 | |||||||
67 | <?php get_template_part( 'no-results', 'archive-comic' ); ?> |
||||||
68 | |||||||
69 | <?php endif; |
||||||
70 | wp_reset_postdata(); ?> |
||||||
71 | |||||||
72 | </main><!-- #content --> |
||||||
73 | </section><!-- #primary --> |
||||||
74 | |||||||
75 | <?php get_sidebar(); ?> |
||||||
0 ignored issues
–
show
The function
get_sidebar 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
![]() |
|||||||
76 | <?php get_footer(); ?> |
||||||
0 ignored issues
–
show
The function
get_footer 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
![]() |
|||||||
77 |