These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * Template Name: Archive titles |
||
4 | * The template for displaying comic Archives by titles only. |
||
5 | * |
||
6 | * @package WordPress |
||
7 | * @subpackage Strip |
||
8 | */ |
||
9 | |||
10 | get_header(); ?> |
||
11 | |||
12 | <section id="primary" |
||
13 | <main id="content" role="main"> |
||
14 | |||
15 | View Code Duplication | <?php if ( '' !== get_the_post_thumbnail() ) : ?> |
|
0 ignored issues
–
show
|
|||
16 | |||
17 | <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'strip' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="strip-featured-thumbnail"> |
||
18 | <?php the_post_thumbnail( 'strip-featured-thumbnail' ); ?> |
||
19 | </a> |
||
20 | <?php endif; ?> |
||
21 | |||
22 | <header class="entry-header"> |
||
23 | |||
24 | <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?> |
||
25 | |||
26 | <?php // call the series by title and list them. ?> |
||
27 | |||
28 | <h2 class="series-title"> |
||
29 | |||
30 | <?php |
||
31 | $args = array( |
||
32 | 'post_type' => 'comic', |
||
33 | 'title_li' => esc_html_e( 'All Episodes', 'strip' ), |
||
34 | ); |
||
35 | wp_list_pages( $args ); |
||
36 | ?> |
||
37 | </h2> |
||
38 | <br> |
||
39 | |||
40 | </main><!-- #content --> |
||
41 | </section><!-- #primary --> |
||
42 | |||
43 | <?php get_sidebar(); ?> |
||
44 | <?php get_footer(); ?> |
||
45 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.