Skip to content

Commit 14a4527

Browse files
462: New category page that shows warning box.
1 parent d430bc9 commit 14a4527

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

themes/api.jquery.com/category.php

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?php
2+
/**
3+
* The template for displaying Category Archive pages.
4+
*/
5+
6+
get_header(); ?>
7+
8+
9+
<div class="content-right twelve columns">
10+
<div id="content">
11+
<?php if ( have_posts() ) : ?>
12+
13+
<header class="page-header">
14+
<h1 class="page-title"><?php
15+
printf( __( 'Category: %s', 'twentyeleven' ), '<span>' . single_cat_title( '', false ) . '</span>' );
16+
?></h1>
17+
<hr>
18+
<?php
19+
20+
$current_url = home_url(add_query_arg(null, null));
21+
22+
if (jq_is_version_deprecated($current_url)) {
23+
24+
?>
25+
26+
<div id="support-warning-box" class="warning"><svg width="20" height="20" viewBox="0 0 24 24">
27+
<circle cx="12" cy="12" r="10" fill="none" stroke="black" stroke-width="2" />
28+
<text x="50%" y="57%" dominant-baseline="middle" text-anchor="middle">i</text>
29+
</svg>&nbsp;&nbsp;This version is End-of-Life. Read more about support options&nbsp;<a href="https://jquery.com/support/">here</a>.
30+
</div>
31+
32+
<?php
33+
34+
}
35+
36+
$category_description = category_description();
37+
if ( ! empty( $category_description ) ) {
38+
echo apply_filters( 'category_archive_meta',
39+
'<div class="category-archive-meta">' . $category_description . '</div>' );
40+
}
41+
?>
42+
43+
</header>
44+
45+
<?php
46+
while ( have_posts() ) : the_post();
47+
get_template_part( 'content', 'listing' );
48+
endwhile;
49+
?>
50+
51+
<?php echo jq_content_nav(); ?>
52+
53+
<?php else : ?>
54+
55+
<article id="post-0" class="post no-results not-found">
56+
<header class="entry-header">
57+
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
58+
</header>
59+
60+
<div class="entry-content">
61+
<p><?php _e( 'Apologies, but no results were found for the requested archive.', 'twentyeleven' ); ?></p>
62+
</div>
63+
</article>
64+
65+
<?php endif; ?>
66+
</div>
67+
68+
<?php get_sidebar(); ?>
69+
</div>
70+
71+
<?php get_footer(); ?>

0 commit comments

Comments
 (0)