Skip to content

Commit 89dc838

Browse files
committedDec 2, 2011
Added WordPress body and post classes
1 parent c04bef0 commit 89dc838

File tree

4 files changed

+159
-4
lines changed

4 files changed

+159
-4
lines changed
 

‎header.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<?php wp_head(); ?>
4949

5050
</head>
51-
<body>
51+
<body <?php body_class(); ?>>
5252

5353
<!-- Begin Container -->
5454
<div class="container" role="main">
@@ -78,4 +78,4 @@
7878
<!-- End Navigation -->
7979

8080

81-
81+

‎header.php~

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<!DOCTYPE html>
2+
3+
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
4+
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"<?php language_attributes(); ?>> <![endif]-->
5+
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" <?php language_attributes(); ?>> <![endif]-->
6+
<!--[if IE 8]> <html class="no-js lt-ie9" <?php language_attributes(); ?>> <![endif]-->
7+
<!--[if gt IE 8]><!--> <html <?php language_attributes(); ?>> <!--<![endif]-->
8+
<head>
9+
<meta charset="utf-8" />
10+
11+
<title><?php bloginfo('name'); ?> | <?php is_home() ? bloginfo('description') : wp_title(''); ?></title>
12+
13+
<!-- Set the viewport width to device width for mobile -->
14+
<meta name="viewport" content="initial-scale=1.6; maximum-scale=1.0; width=device-width; "/>
15+
16+
<!-- Schema.org Description -->
17+
<meta itemprop="name" content="">
18+
<meta itemprop="description" content="">
19+
20+
<!-- Setting favicon and Apple Touch Icon -->
21+
<link rel="apple-touch-icon" href="<?php bloginfo ("template_url");?>/images/misc/apple-touch-icon.png">
22+
<link rel="icon" type="image/png" href="<?php bloginfo ("template_url"); ?>/images/misc/favicon.ico">
23+
24+
<!-- Apple Developer Options -->
25+
<meta name="apple-mobile-web-app-status-bar-style" content="black">
26+
<meta name="apple-mobile-web-app-capable" content="yes">
27+
28+
<!-- Included CSS Files -->
29+
<link rel="stylesheet" href="<?php bloginfo ("stylesheet_url"); ?>">
30+
31+
<!--[if lt IE 9]>
32+
<link rel="stylesheet" href="stylesheets/ie.css">
33+
<![endif]-->
34+
35+
<!-- IE Fix for HTML5 Tags -->
36+
<!--[if lt IE 9]>
37+
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
38+
<![endif]-->
39+
40+
<!-- Orbit IE Settings -->
41+
<!--[if IE]>
42+
<style type="text/css">
43+
.timer { display: none !important; }
44+
div.caption { background:transparent; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000,endColorstr=#99000000);zoom: 1; }
45+
</style>
46+
<![endif]-->
47+
48+
<?php wp_head(); ?>
49+
50+
</head>
51+
<body>
52+
53+
<!-- Begin Container -->
54+
<div class="container" role="main">
55+
56+
<!-- Begin Skip Content -->
57+
<nav class="row">
58+
<div class="twelve columns hide-on-desktops"><a href="#skipcontent">Skip Content? &darr;</a></div>
59+
</nav>
60+
<!-- End Skip Content -->
61+
62+
<!-- Begin Header -->
63+
<header class="row">
64+
<hgroup class="twelve columns">
65+
<h1><a href="<?php echo home_url( '/' ); ?>" rel="home"><?php bloginfo('name'); ?></a></h1>
66+
<h4 class="subheader"><?php bloginfo('description'); ?></h4>
67+
</hgroup>
68+
</header>
69+
<!-- End Header -->
70+
71+
<!-- Begin Navigation -->
72+
<div class="row">
73+
<nav class="menu twelve columns">
74+
<?php wp_nav_menu( array( 'theme_location' => 'header-menu') ); ?>
75+
<hr>
76+
</nav>
77+
</div>
78+
<!-- End Navigation -->
79+
80+
81+

‎index.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
<?php while ( have_posts() ) : the_post(); ?>
2222

23-
<article>
23+
<article <?php post_class(); ?>>
2424

2525
<a href="#" class="hide-on-desktops" style="float: right;" alt="Back to Top">Top &uarr;</a>
2626

@@ -71,4 +71,4 @@
7171

7272
</div>
7373

74-
<?php get_footer(); ?>
74+
<?php get_footer(); ?>

‎index.php~

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?php get_header(); ?>
2+
3+
<div class="row">
4+
5+
<!-- Begin Post Loop, includes: date, author, category, comment, edit & post -->
6+
7+
<!-- Begin Error Message, display if no posts are found -->
8+
<?php if ( ! have_posts() ) : ?>
9+
<div class="twelve columns">
10+
<h3>Not Found</h1>
11+
<p>Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post?</p>
12+
</div>
13+
<?php endif; ?>
14+
<!-- End Error Message -->
15+
16+
<div class="nine columns">
17+
18+
<!-- Loop Through Posts -->
19+
<?php query_posts( 'posts_per_page=2' ); ?>
20+
21+
<?php while ( have_posts() ) : the_post(); ?>
22+
23+
<article>
24+
25+
<a href="#" class="hide-on-desktops" style="float: right;" alt="Back to Top">Top &uarr;</a>
26+
27+
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
28+
29+
<div>
30+
Posted on <strong><?php the_date(); ?></strong>
31+
by <span class="author"><?php the_author(); ?></span>
32+
under <span class="author"><?php the_category(', '); ?></span>
33+
</div>
34+
35+
<div>
36+
<?php edit_post_link('Edit', '<span> ' , '</span>'); ?>
37+
<span class="comment-count"><?php comments_popup_link('Leave a comment', '1 Comment', '% Comments'); ?></span>
38+
</div>
39+
40+
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
41+
<?php the_excerpt(); ?>
42+
<?php else : ?>
43+
<?php the_content('Read More'); ?>
44+
<hr>
45+
<?php endif; ?>
46+
47+
</article>
48+
49+
<?php endwhile; ?>
50+
<!-- End Looping Through Posts -->
51+
52+
<!-- Begin Pagination -->
53+
<?php if (function_exists("emm_paginate")) {
54+
emm_paginate();
55+
} ?>
56+
<!-- End Pagination -->
57+
58+
<!-- Reset Query -->
59+
<?php wp_reset_query(); ?>
60+
<!-- End Reset Query -->
61+
62+
</div>
63+
64+
<!-- Begin Sidebar -->
65+
<?php get_sidebar(); ?>
66+
<!-- End Sidebar -->
67+
68+
<hr>
69+
70+
<!-- End Post Loop -->
71+
72+
</div>
73+
74+
<?php get_footer(); ?>

0 commit comments

Comments
 (0)
Please sign in to comment.