-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.php
191 lines (158 loc) · 7.22 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<?php get_header(); // MUST come first. Calls the header PHP file. Used in all primary template page types (index.php, single.php, archive.php, search.php, page.php) ?>
<body id="home" <?php body_class(); ?>>
<!-- Begin Extent (div#extent) -->
<div id="extent">
<?php
/*
All displayed content (including the footer) is contained within div#extent, for which width and position are set via CSS.
*/
?>
<!-- Begin Header (div#header)-->
<div id="header">
<!-- Begin Blog Head -->
<?php get_template_part('site-header'); // site-header.php contains the Main Navigation Menu, Blog Title and Blog description. ?>
<!-- End Blog Head -->
</div>
<!-- End Header (div#header) -->
<?php get_template_part('infobar'); // infobar.php contains the location/breadcrumb/login/search bar. ?>
<!-- Begin Content (div#content) -->
<div id="content">
<?php
/*
Main blog content (left column, center column, right column) is contained within div#content.
*/
?>
<!-- Begin Main (div#main) -->
<div id="main">
<?php
/*
div#main contains the center column content of the three-column layout. Generally, the center column contains the main content of the page (blog post/posts,
page content, search results, etc.).
*/
get_template_part('loop');
/*
loop.php is the center column content for all primary template page types (index.php, single.php, archive.php, search.php, page.php), and contains
the WordPress "loop". For other non-WordPress pages (or any page not containing the "loop", the site structure can be kept consistent by replacing "loop.php"
with whatever file is desired.
*/
?>
</div>
<!-- End Main (div#main) -->
<!-- Begin Left Column (div#leftcol) -->
<?php if ( ! is_attachment() ) { ?>
<div id="leftcol">
<?php
/*
div#leftcol contains the left column content of the three-column layout.
*/
get_sidebar('left');
/*
sidebar-left.php is the left column content. Used in all primary template page types (index.php, single.php, archive.php, search.php, page.php)
For index.php, sidebar-left and sidebar-right both appear to the right of the main content column.
For page.php, sidebar-left is to the left, and sidebar-right is to the right, with the main content column in the center.
*/
?>
</div>
<!-- End Left Column (div#leftcol) -->
<!-- Begin Right Column (div#rightcol) -->
<div id="rightcol">
<?php
/*
div#rightcol contains the right column content of the three-column layout.
*/
get_sidebar('right');
/*
sidebar-right.php is the right column content. Used in all primary template page types (index.php, single.php, archive.php, search.php, page.php)
For index.php, sidebar-left and sidebar-right both appear to the right of the main content column.
For page.php, sidebar-left is to the left, and sidebar-right is to the right, with the main content column in the center.
*/
?>
</div>
<!-- End Right Column (div#rightcol) -->
<?php } ?>
</div>
<!-- End Content (div#content)-->
<!-- Begin Footer (div#footer) -->
<div id="footer">
<?php get_footer(); // Used in all primary template page types (index.php, single.php, archive.php, search.php, page.php) ?>
</div>
<!-- End Footer (div#footer) -->
</div>
<!-- End Extent (div#extent) -->
<?php wp_footer(); ?>
</body>
</html>
<?php /*
Reference:
=============================================================================
The following functions, tags, and hooks are used (or referenced) in this Theme template file:
***********************
body_class()
----------------------------------
body_class() is a WordPress template tag.
Codex reference: http://codex.wordpress.org/Template_Tags/body_class
body_class() is added inside the HTML <body> tag, and outputs various CSS class
declarations, depending on which page is currently being displayed.
For the full list of CSS classes returned by body_class(), see the Codex.
***********************
get_footer()
----------------------------------
get_footer() is a WordPress template tag.
Codex reference: http://codex.wordpress.org/Function_Reference/get_footer
get_footer() is used to include the footer Theme template file (footer.php) within another. This function facilitates
re-use of Theme template files, and also facilitates child Theme template files to take precedence
over parent Theme template files.
get_footer( $foo ) will attempt to include footer-foo.php. If it doesn't exist, the default footer.php will be used.
***********************
get_header()
----------------------------------
get_header() is a WordPress template tag.
Codex reference: http://codex.wordpress.org/Function_Reference/get_header
get_template_part() is used to include the header Theme template file (header.php) within another. This function facilitates
re-use of Theme template files, and also facilitates child Theme template files to take precedence
over parent Theme template files.
get_header( $foo ) will attempt to include header-foo.php. If it doesn't exist, the default header.php will be used.
***********************
get_sidebar()
----------------------------------
get_sidebar() is a WordPress template tag.
Codex reference: http://codex.wordpress.org/Function_Reference/get_sidebar
get_sidebar() is used to include a sidebar template file within another. This function facilitates
re-use of Theme template files, and also facilitates child Theme template files to take precedence
over parent Theme template files.
get_sidebar( $name ) will attempt to include sidebar-name.php. The function will attempt to
include files in the following order, until it finds one that exists:
- the Theme's sidebar-name.php
- the Theme's sidebar.php
- the parent Theme's sidebar-name.php
- the parent Theme's sidebar.php
get_sidebar() with no argument passed will attempt to include sidebar.php. The function will
attempt to include files in the following order, until it finds one that exists:
- the Theme's sidebar.php
- the parent Theme's sidebar.php
***********************
get_template_part()
----------------------------------
get_template_part() is a WordPress template tag.
Codex reference: http://codex.wordpress.org/Function_Reference/get_template_part
get_template_part() is used to include a Theme template file within another. This function facilitates
re-use of Theme template files, and also facilitates child Theme template files to take precedence
over parent Theme template files.
get_template_part( $file ) will attempt to include file.php. The function will attempt to
include files in the following order, until it finds one that exists:
- the Theme's file.php
- the parent theme's file.php
get_template_part( $file , $foo ) will attempt to include file-foo.php. The function will
attempt to include files in the following order, until it finds one that exists:
- the Theme's file-foo.php
- the Theme's file.php
- the parent theme's file-foo.php
- the parent theme-s file.php
***********************
wp_footer()
----------------------------------
wp_footer() is a WordPress action hook.
Codex reference: http://codex.wordpress.org/Plugin_API/Action_Reference/wp_footer
wp_footer() is used by themes/plugins, usually to insert content into the WordPress Theme footer.
=============================================================================
*/ ?>