author | Anthony Ly <anthonyly.com@gmail.com> |
Tue, 12 Mar 2013 18:21:39 +0100 | |
changeset 206 | 919b4ddb13fa |
parent 204 | 09a1c134465b |
permissions | -rw-r--r-- |
204
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
1 |
<?php |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
2 |
/** |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
3 |
* The main template file. |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
4 |
* |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
5 |
* This is the most generic template file in a WordPress theme |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
6 |
* and one of the two required files for a theme (the other being style.css). |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
7 |
* It is used to display a page when nothing more specific matches a query. |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
8 |
* For example, it puts together the home page when no home.php file exists. |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
9 |
* |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
10 |
* Learn more: http://codex.wordpress.org/Template_Hierarchy |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
11 |
* |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
12 |
* @package WordPress |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
13 |
* @subpackage Twenty_Twelve |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
14 |
* @since Twenty Twelve 1.0 |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
15 |
*/ |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
16 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
17 |
get_header(); ?> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
18 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
19 |
<div id="primary" class="site-content"> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
20 |
<div id="content" role="main"> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
21 |
<?php if ( have_posts() ) : ?> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
22 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
23 |
<?php /* Start the Loop */ ?> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
24 |
<?php while ( have_posts() ) : the_post(); ?> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
25 |
<?php get_template_part( 'content', get_post_format() ); ?> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
26 |
<?php endwhile; ?> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
27 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
28 |
<?php twentytwelve_content_nav( 'nav-below' ); ?> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
29 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
30 |
<?php else : ?> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
31 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
32 |
<article id="post-0" class="post no-results not-found"> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
33 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
34 |
<?php if ( current_user_can( 'edit_posts' ) ) : |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
35 |
// Show a different message to a logged-in user who can add posts. |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
36 |
?> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
37 |
<header class="entry-header"> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
38 |
<h1 class="entry-title"><?php _e( 'No posts to display', 'twentytwelve' ); ?></h1> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
39 |
</header> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
40 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
41 |
<div class="entry-content"> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
42 |
<p><?php printf( __( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'twentytwelve' ), admin_url( 'post-new.php' ) ); ?></p> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
43 |
</div><!-- .entry-content --> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
44 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
45 |
<?php else : |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
46 |
// Show the default message to everyone else. |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
47 |
?> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
48 |
<header class="entry-header"> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
49 |
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentytwelve' ); ?></h1> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
50 |
</header> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
51 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
52 |
<div class="entry-content"> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
53 |
<p><?php _e( 'Apologies, but no results were found. Perhaps searching will help find a related post.', 'twentytwelve' ); ?></p> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
54 |
<?php get_search_form(); ?> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
55 |
</div><!-- .entry-content --> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
56 |
<?php endif; // end current_user_can() check ?> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
57 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
58 |
</article><!-- #post-0 --> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
59 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
60 |
<?php endif; // end have_posts() check ?> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
61 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
62 |
</div><!-- #content --> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
63 |
</div><!-- #primary --> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
64 |
|
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
65 |
<?php get_sidebar(); ?> |
09a1c134465b
man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff
changeset
|
66 |
<?php get_footer(); ?> |