Skip to content

Commit 7bd0a26

Browse files
committed
Standardize category and sidebar.
1 parent 3e5bf08 commit 7bd0a26

File tree

15 files changed

+59
-166
lines changed

15 files changed

+59
-166
lines changed

themes/api.jquery.com/category.php

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php get_template_part( 'content', 'api' ); ?>

themes/api.jquery.com/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
?>
1212
</div>
1313

14-
<?php get_sidebar( 'api' ); ?>
14+
<?php get_sidebar(); ?>
1515
</div>
1616
<?php get_footer(); ?>

themes/api.jquerymobile.com/category.php

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php get_template_part( 'content', 'api' ); ?>

themes/api.jqueryui.com/category.php

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php get_template_part( 'content', 'api' ); ?>

themes/api.qunitjs.com/category.php

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php get_template_part( 'content', 'api' ); ?>

themes/jquery/category-api.php

Lines changed: 0 additions & 48 deletions
This file was deleted.

themes/jquery/category.php

Lines changed: 43 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,48 @@
55

66
get_header(); ?>
77

8-
<section id="body">
9-
<div class="inner" role="main">
10-
11-
<?php if ( have_posts() ) : ?>
12-
13-
<header class="page-header">
14-
<h1 class="page-title"><?php
15-
printf( __( 'Category Archives: %s', 'twentyeleven' ), '<span>' . single_cat_title( '', false ) . '</span>' );
16-
?></h1>
17-
18-
<?php
19-
$category_description = category_description();
20-
if ( ! empty( $category_description ) )
21-
echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
22-
?>
23-
</header>
24-
25-
<?php twentyeleven_content_nav( 'nav-above' ); ?>
26-
27-
<?php /* Start the Loop */ ?>
28-
<?php while ( have_posts() ) : the_post(); ?>
29-
30-
<?php
31-
get_template_part( 'content' );
32-
?>
33-
34-
<?php endwhile; ?>
35-
36-
<?php twentyeleven_content_nav( 'nav-below' ); ?>
37-
38-
<?php else : ?>
39-
40-
<article id="post-0" class="post no-results not-found">
41-
<header class="entry-header">
42-
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
43-
</header><!-- .entry-header -->
44-
45-
<div class="entry-content">
46-
<p><?php _e( 'Apologies, but no results were found for the requested archive.', 'twentyeleven' ); ?></p>
47-
</div><!-- .entry-content -->
48-
</article><!-- #post-0 -->
49-
50-
<?php endif; ?>
51-
52-
</div><!-- .inner -->
53-
</section><!-- #body -->
8+
<div class="content-right">
9+
<div id="content">
10+
<?php if ( have_posts() ) : ?>
11+
12+
<header class="page-header">
13+
<h1 class="page-title"><?php
14+
printf( __( 'Category: %s', 'twentyeleven' ), '<span>' . single_cat_title( '', false ) . '</span>' );
15+
?></h1>
16+
<hr>
17+
<?php
18+
$category_description = category_description();
19+
if ( ! empty( $category_description ) ) {
20+
echo apply_filters( 'category_archive_meta',
21+
'<div class="category-archive-meta">' . $category_description . '</div>' );
22+
}
23+
?>
24+
</header>
25+
26+
<?php
27+
while ( have_posts() ) : the_post();
28+
get_template_part( 'content', 'listing' );
29+
endwhile;
30+
?>
31+
32+
<?php twentyeleven_content_nav( 'nav-below' ); ?>
33+
34+
<?php else : ?>
35+
36+
<article id="post-0" class="post no-results not-found">
37+
<header class="entry-header">
38+
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
39+
</header>
40+
41+
<div class="entry-content">
42+
<p><?php _e( 'Apologies, but no results were found for the requested archive.', 'twentyeleven' ); ?></p>
43+
</div>
44+
</article>
45+
46+
<?php endif; ?>
47+
</div>
48+
49+
<?php get_sidebar(); ?>
50+
</div>
5451

5552
<?php get_footer(); ?>

themes/jquery/search-api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@
4444
<?php endif; ?>
4545
</div>
4646

47-
<?php get_sidebar( 'api' ); ?>
47+
<?php get_sidebar(); ?>
4848
</div>

themes/jquery/sidebar-api.php

Lines changed: 0 additions & 15 deletions
This file was deleted.

themes/jquery/sidebar.php

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
11
<?php
22
/**
3-
* The Sidebar containing the main widget area.
3+
* The default sidebar lists categories, up to 2 levels deep.
44
*/
55
?>
6-
<div id="sidebar" class="widget-area" role="complementary">
7-
<?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>
8-
9-
<aside id="archives" class="widget">
10-
<h3 class="widget-title"><?php _e( 'Archives', 'twentyeleven' ); ?></h3>
11-
<ul>
12-
<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
13-
</ul>
14-
</aside>
15-
16-
<aside id="meta" class="widget">
17-
<h3 class="widget-title"><?php _e( 'Meta', 'twentyeleven' ); ?></h3>
18-
<ul>
19-
<?php wp_register(); ?>
20-
<li><?php wp_loginout(); ?></li>
21-
<?php wp_meta(); ?>
22-
</ul>
23-
</aside>
24-
25-
<?php endif; // end sidebar widget area ?>
26-
</div><!-- #sidebar .widget-area -->
6+
<div id="sidebar" class="widget-area" role="complementary">
7+
<?php $cat_args = array( 'depth' => 2, 'title_li' => '', 'current_category' => jq_post_category() ); ?>
8+
<aside id="categories" class="widget">
9+
<ul>
10+
<?php wp_list_categories( $cat_args ); ?>
11+
</ul>
12+
</aside>
13+
</div>

themes/jquery/single-api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
<?php endwhile; // end of the loop. ?>
1919
</div><!-- #content -->
2020

21-
<?php get_sidebar( 'api' ); ?>
21+
<?php get_sidebar(); ?>
2222
</div>

0 commit comments

Comments
 (0)