You are on page 1of 98

WordPress

WordPress
WordPress

WordPress
So you want to create WordPress themes huh?

WordPress

............................................................................................... 1
........................................................................................ 5
WordPress WordPress
...................... 6
WordPress ........................................... 6
WordPress #1
............................................................ 7
........................................................................................ 7
........................................................................................ 8
........................................................................................ 9
WordPress #2
.......................................... 9
Header : ............................................................................ 10
Index ............................................................................ 10
Sidebar ............................................................................ 11
Footer ........................................................................... 12
WordPress #3
Index.php........................................ 13
1 XAMPP ....................................................... 13
2 ....................................................... 14
3 index.php style.css .................................... 14
4 style.css.................................................................. 16
5 .................................................................. 16
WordPress #4a
Header .......................................... 18
1 XAMPP ............................................ 18

2 index.php ................................................................... 18
3...................................................................... 18
4...................................................................... 20
WordPress #4b
Header 2 ....................................... 21
1 XAMPP index.php .......................................... 21
2 H1 ............................................. 21
3...................................................................... 22
4DIV ............................................................................. 22
5 Header DIV ........................................................ 22
WordPress #5
...................................................... 23
1 container Div .............................................................. 24
2............................................................... 25
3...................................................................... 26
4 ........................................................... 27
WordPress #5b
................................................ 28
1 the_content() ................................ 29
2DIV ........................... 31
WordPress #5c
Metadata
...................... 34
WordPress #5d
Else
ID
...................... 37
1Else .................................................................................... 37
2 ID................................................................................ 38
3 ............................................................................. 39
WordPress #5e
......................................... 39
WordPress #6
...................................................... 41
1 id "sidebar" DIV................................................. 41
2 DIV ............................................ 41
3.................................................... 42
4............................................................... 43
WordPress #6b
......................................... 44
WordPress #6c
...................................... 47
1 - ........................................................... 47
2............................................................... 48
WordPress #6d
......................................... 49
1 ......................................................................... 50
2 ............................................................................. 51
3Metadata ................................................... 52
WordPress #6e
......................................... 54

1 functions.php ..................................................... 54
2...................................................................... 54
WordPress #7
.......................................................... 55
1 DIV ................................................................. 55
2...................................................................... 56
WordPress #8
XHTML ............................................ 56
WordPress #9
Style.css CSS
............................ 58
1 style.css ............................................................. 59
2 CSS ................................................................ 59
WordPress #10
......... 62
............................................................................... 62
1...................................................................... 62
2 ....................................................... 63
WordPress #11
............................................. 64
1............................................................... 64
2...................................................................... 65
3 header ..................................................... 65
4 Container ................................................. 65
5 Sidebar .................................................... 65
6 Footer .................................................. 66
7 10 .............................................. 66
8 IE bug ......................... 66
WordPress #12
........................... 67
1Reset CSS.......................................................................... 67
2 H1 ................................................................... 67
3 ......................................................................... 68
4............................................................... 69
5 .................................................................. 69
6...................................................................... 69
WordPress #13
......................................... 70
1.................................................... 70
2 LI .................................................................... 71
3.................................................... 71
4 UL LI ....................................................... 72
5 .............................. 73
WordPress #14
Index .................................. 75
1 footer ...................................................................... 75

2 footer P ........................................................... 75
3header.php ......................................................................... 75
4 index.php header.php ........................................ 76
4sidebar.php ........................................................................ 77
5footer.php ........................................................................... 77
.......................................................................................... 77
WordPress #15
............................................. 78
1archive.php......................................................................... 78
2search.php ......................................................................... 78
3page.php single.php ...................................................... 79
4 page.php .................................................................... 79
5 single.php................................................................... 81
.......................................................................................... 81
WordPress #16
................................................ 82
1 comments.php............................................................ 82
2 ......................................................................... 82
3 single.php ................................................ 82
4 ......................................................................... 83
.................................................................... 84
erdaoo WP Theme ................................................. 85
WP ................................................................................... 85
index.php ........................................................................................ 86
class ................................................................................................ 89
Not Found ....................................................................................... 89
.......................................................................................... 89
............................................................................................. 91
.......................................................................................... 95

Hostev Studios................................................................ 97
(TW) Standard................................................................................. 97
(TW) Professional ........................................................................... 97
(US) .......................................................................... 97
......................................................... 97
.......................................................................................... 98


WordPress Denis WordPress
Pseric
PDF
12354 box.net
1200912Denis
2010-1-17
Denis
WordPress WordPress PDF

Denishttp://wpjam.com/contact/ Pseric
http://www.freegroup.org/contact/
WordPress JAM WordPress
WordPress
WordPress JAM Wordpress
WordPress WordPress SEO
WordPress JAM WordPress

Media Temple
Denis 99% up
time
Media
Temple

Media Temple
Media Temple blogger

Media
Temple Media Temple


Web 2.0,

WordPress WordPress

WordPress

WordPress

WordPress WordPress

WordPress

WordPress


WordPress
Windows WordPress WordPress
WordPress
WordPress
WordPress WordPress
LAMP Linux+Apache+MySQL+PHP
Win+IIS LAMP
(MT) Media Temple
NotePad++ Vim

FTP Filezilla
SmartFTP
Firefox FTP Add-onsFireftp Firefox

XHTML CSS
XHTML CSS

WordPress
WordPress

WordPress #1

WordPress #1
WordPress

WordPress
WordPress
WordPress

WordPress
HTML WordPress WordPress

#1 HTML

ul

HTML < > /


<> </>
ulli li
ul
#2 - style.css index.phpindex.php
style.css

style.css
index.php
home.php
single.php
page.php
archive.php
category.php
search.php
404.php
comments.php
comments-popup.php
author.php
date.php

Template
--

Template file
--
index.phpstyle.css
sidebar.php
Theme
WordPress theme
WordPress --
WordPress theme
WordPress template(s)

Post
-- blog

Page
-- post
WordPresspage Page


WordPress
WordPress 6
13 6

WordPress
WordPress

archive.php WordPress
index.php
single.php
index.php

WordPress #2

template files
template WordPress
WordPress #1
#2
WordPress #1 WordPress

WordPress

index.php 4 header.php
index.phpsidebar.php footer.php

Header
:

title
description

Index

Metadata

Sidebar

Footer

header.php footer.php

index.php

header.phpsingle.phpsidebar.php footer

WordPress #3
Index.php
Index.php WordPress
WordPress WordPress
WordPress
WordPress
WordPress

1
XAMPP
XAMPP C:\xampp xampp-control.exe
Apache MySQL

WordPress xampp/htdocs/wordpress/wpcontent/themes tutorial

3
index.php style.css
index.txt
index.php

style.css .

: index.php style.css.

index.php

Doctype -

<html>
<head> </head>

<?php bloginfo("stylesheet_url"); ?> PHP style.css


style.css PHP
<?php ?> PHP HTML
PHP <?php PHP ?> PHP

<?php - PHP
bloginfo("stylesheet_url") - style.css
; - PHP
?> - PHP

<body> -
</body>

</html>

4
style.css

style.txt style.css

http://localhost/wordpress/wp-login.php
WordPress WordPress 1
Xampp
(Apperance) Tutorial

WordPress


http://localhost/wordpress

Xampp Apache MySQL


Exit

WordPress #4a
Header
Header
WordPress
XAMPP WordPress PHP
PHP

1
XAMPP
Xamppxampp/htdocs/wordpress/wpcontent/themes/tutorialindex.php
style.css

index.php style.css index.txt style.txt

2
index.php
http://localhost/wordpress

index.php

index.php

index.php <body> </body> <?php


bloginfo('name'); ?>


Demo
Theme Development

(body) PHP index.phpbloginfo()


name
option Weblog Title

<?php - PHP
bloginfo('name') -
; -
?> - PHP

index.php

XHTML
index.php
<a href="#"> </a>
<a href="#"><?php bloginfo('name'); ?></a>

href= <?php bloginfo('url'); ?>

<a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a>

http://localhost/wordpress

# http://localhost/wordpress

bloginfo('url') - URL
<a> - XHTML
</a> -

#1
href="" -

<a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a>


URL PHP bloginfo('url')
URL PHP
bloginfo('name')
WordPress XHTML Header

WordPress #4b
Header 2
Header 2 WordPress
Herder
DIV Box

1
XAMPP index.php
- Xampp
- Tutorial
- http://localhost/wordpress
- index.php

2
H1
index.php
<a href="<?php bloginfo("url"); ?>"><?php bloginfo("name"); ?></a>
<h1> </h1> H1 HTML 7
H1H2H3H4H5H6H1H6
index.php
<h1><a href="<?php bloginfo("url"); ?>"><?php bloginfo("name"); ?></a></h1>

<?php
bloginfo("description"); ?>

<h1><a href="<?php bloginfo("url"); ?>"><?php bloginfo("name"); ?></a></h1>


<?php bloginfo("description"); ?>

WordPress
<?php - PHP
bloginfo("description") -
; -
?> PHP

4
DIV
-- DIV
<div> </div>
<div>
<h1><a href="?php bloginfo("url"); ?>"><?php bloginfo("name"); ?></a></h1>
<?php bloginfo("description"); ?>
</div>

DIV (box)

style.css DIV
borders

paddings
,
margins

background
color

background images

5
Header DIV
id="header" DIV
<div id="header">


DIV ID DIV
ID

WordPress #5

The Loop
WordPress PHP
WordPress

WordPress

header

The Loop

Xampptutorial http://localhost/
wordpress index.php
index.php

1
container Div
header DIV DIV ID container

<div id="container">
</div>
container DIV
sidebar footer

Container DIV
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<?php endwhile; ?>
<?php endif; ?>
WordPress
The Loop

index.php

Container DIV

(
tab
)

if(have_posts()) -

while(have_posts()) -

the_post()
the_post() -
endwhile; - #1 while()
endif; - if()

have_posts() the_post();
the_post(); if() while()

bloginfo('name')

The Loop

the_post(); ?> <?php endwhile; ?> <?php the_title(); ?>

index.php
Hello World WordPress

Hello World

<?php the_title(); ?> <a href="#"> </a>

#
the_permalink()
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
the_permalink() PHP
Hello World
http://localhost/wordpress/#

<h2> </h2>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
H1 H2
index.php

WordPress index.php

WordPress #5b

WordPress
DIV

WordPress

XAMPPtutorial
http://localhost/wordpress index.php

1
the_content()
<?php the_content(); ?>

?
PHP the_content()

style.css
WordPress


Internet Explorer

Firefox FireFox

index.php

the_content()
WordPress

P index.php

P
-
P paragraph P

- WordPress P

2
DIV
the_content() DIV DIV class="entry"

<div class="entry">
</div>
index.php

class="entry" DIV

style.css class

id class
DIV id id="header"id
classid class
id="header" id="container" class="entry"
header container class id
id id="header"

class
3
class="post" DIV
DIV DIV
class="post"
<div class="post">
</div>
class ID class ID
post entry

index.php

tab

</div>
<div>

DIV
DIV class="entry"

div
class="post"

WordPress #5c
Metadata

Metadata
WordPress
MetadataPostmetadata

date

categories

author

number of
comments

XAMPP index.php
index.php

postmetadata.txt <?php the_content(); ?>


WordPress

Metadata

Metadata

<p class="postmetadata"> </p> - Metadata


class="postmetadata" Metadata
Metadata
Metadata
<?php _e("Filed under:"); ?> - : :
Filed under:<?php _e(" "); ?> Filed
under: Filed under:
<?php the_category(", ") ?> - the_category()
PHP Filed under: the_category() Filed
under: Name of category 1, Name of category 2the_category()
Metadata

<?php _e("by"); ?> - Filed under: by


_e() _e()
_e()

<?php the_author(); ?> -


<br /> - BR
/
<?php comments_popup_link("No Comments ", "1 Comment ", "%
Comments "); ?> - comments_popup_link()
comments_popup_link()
No Comments ? 1 Comment
1% Comments &187; 8
Comments % ?

<?php edit_post_link("Edit", " | ", "); ?> -


edit_post_link()

edit_post_link()
Edit post Edit post Edit
|&124;

WordPress Edit

WordPress #5d
Else
ID

Else
ID
WordPress
3Elsepost ID,
title
Xampp

1
Else
<?php endwhile; ?>
<?php else : ?>
<div class="post">
<h2><?php _e("Not Found"); ?></h2>
</div>

#5 --


<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<?php endwhile; ?>
<?php endif; ?>
if(have_posts())
while(have_posts()) the_post() Else
while() endwhile; if() else :
<?php else : ?> <?php endwhile; ?>
else
WordPress WordPress Not Found
index.php
Not Found <?php _e(''); ?>

Not Found <h2> </h2>

<div class="post">
Not Found
</div>
<h2>

<div class="post"> </div>


<div class="post"> </div>

2
ID
id="post-<?php the_ID(); ?>" <div class="post">

>

IDthe_ID() ID

style.css
ID
ID
style.css
class id DIV DIV class
id DIV class
id
id XHTML the_ID() PHP

title="<?php the_title(); ?>"

Hello World title="Hello World"


title="" <a>
the_title() PHP

the_title() title=""
title="Click me" the_title()
Click me

Technorati.comWordPress Technorati
Technorati

WordPress #5e

WordPress
WordPress (Next Page) (Previous
Page) WordPress
posts_nav_link()
<?php endwhile; ?> <?php else : ?>

<div class="navigation">
<?php posts_nav_link(); ?>
</div>

<div class="navigation"> - navigation DIV


<?php - PHP
posts_nav_link() -
; -
?> - PHP
</div> - navigation DIV

10
10
Settings > Reading
65
posts_nav_link()
postmetadata 3

<?php posts_nav_link("in between","before","after"); ?>


123

posts_nav_link()

WordPress #6

WordPress
WordPress
index.php

1
id "sidebar" DIV
sidebar DIV
container </body>
<div class="sidebar">
</div>

2
DIV
sidebar DIV
<ul> -
</ul> -

LIUL

<li><h2><?php _e("Categories"); ?></h2>


</li>

<li> </li>
<li> -
<h2> -
<?php _e("Categories"); ?> - Categories
</h2> -
</li> -
index.php Categories

LI
UL

<ul>
<?php wp_list_cats("sort_column=name&optioncount=1&hierarchical=0"); ?>
</ul>

<ul> -
<?php wp_list_cats(); ?> -
</ul> -

category-links.gif
Uncategorized
Uncategorized

sort_column=name -
optioncount=1 -
hierarchial=0 -

& - &
& sort_column optioncount
<?php wp_list_cats(); ?> <li> </li>
wp_list_cats()
<li> </li>

#1

WordPress #6b

WordPress

Page-link

widgetize

<?php wp_list_pages(); ?>

About

wp_list_pages()

LIPages
UL <li> </li>

PagesCategories

"title_li=<h2>Pages</h2>" wp_list_pages()

title_li <h2>Pages</h2> title_li

depth
3

depth=3& depth=3 & depth


title_li about

WordPress #6c

WordPress
blogroll

1
-
Categories :
<li><h2><?php _e("Archives"); ?></h2>
<ul>
<?php wp_get_archives("type=monthly"); ?>
</ul>
</li>

wp_get_arhives() PHP type monthly

<li> -
<h2> -
<?php _e("Archives"); ?> -
</h2> -
<ul> -
<?php wp_get_archives("type=monthly"); ?> -
<li> </li>
wp_get_archives() LI
wp_list_cats()
</ul> -
</li> -

<?php get_links_list(); ?>

blogroll

get_links_list()
wp_list_pages() #1

WordPress #6d

WordPress

Search Form

Calendar

Metadata
Meta

widgetize

searchform.php index.php
searchform.txt searchform.php
index.php
<li id="search">
<?php include(TEMPLATEPATH . "/searchform.php"); ?>
</li>


<li id="search"> - search ID

include() - WordPress
include()
searhform.php

TEMPLATEPATH - wp-content/themes/
tutorial
'/searchform.php' - /searchform.php
TEMPLATEPATH "/searchform.php"

wp-content/themes/tutorial/searchform.php
</li> -
Blogroll

<li id="calendar"><h2><?php _e("Calendar"); ?></h2>


<?php get_calendar(); ?>
</li>

<li id="calendar"> - ID Calendar


<h2> -
<?php _e("Calendar"); ?> - Calendar
</h2> -
get_calendar() - get_calendar() WP
</li> -

3
Metadata

get_links_list()
<li><h2><?php _e("Meta"); ?></h2>
<ul>
<?php wp_register(); ?>

<li><?php wp_loginout(); ?></li>


<?php wp_meta(); ?>
</ul>
</li>

WordPress

LIH2 Meta
ULLI
wp_register() <li> </li>

Register

Site Admin

wp_loginout()

Login

Logout

wp_meta()
wp_meta()
Meta

WordPress #6e

WordPress
Widget widgetized WordPress

widgetizing

1
functions.php
functions.php functions.txt
functions.php
tutorial4

<ul>
<?php if ( function_exists("dynamic_sidebar") && dynamic_sidebar() ) : else :
?>

</ul>
<?php endif; ?>

index.php WordPress => => Widget


Widget

WordPress #7

footer
WordPress
DIV

1
DIV
DIV
<div id="footer">
</div>

<p>
Copyright 2007 <?php bloginfo("name"); ?>
</p>

header bloginfo()
nameurl

WordPress #8
XHTML
XHTML WordPress CSS
style.css Validate/

Validating/ValidationXHTML
Validator CSS Validator XHTML
Xampp Control http://localhost/wordpress

>

XHTML Validator
Validate by Direct Input

Check

WordPress #9
Style.css CSS
Style.css CSS WordPress
CSS XHTML PHP

style.css


/* */
CSS CSS

/* */

1
style.css
XamppFireFoxIE style.css
http://localhost/wordpress
FireFox IE CSS

SafariOperaLinuxNetscape
FireFox IE

2
CSS
style.css
body{
margin: 0;
font-family: Arial, Helvetica, Georgia, Sans-serif;
font-size: 12px;
text-align: left;
vertical-align: top;
background: #ffffff;
color: #000000;
}
XHTML PHP

style.css
Firefox Internet Explorer
body{ } XHTML
{ } { }

XHTMLPHPCSS
PHP CSS parameters
selectorproperty
body{ } CSS
<body>
<head>
<body> </body>
ID header DIV

margin: 0; body
0 10px20px PX
0 px
body

margin: 0;

font-family: Arial, Helvetica, Georgia, Sans-serif;


Arial
Arial style.css Helvetica Georgia
Sans-serif
> > Windows

font-size: 12px;
text-align: left; text-align: right;
vertical-align: top; body

background: #ffffff; #ffffff #000000

color: #000000;
CSS w3schools.com

WordPress #10

WordPress
CSS

body { color:
#000000;} body
body{
background: #ffffff; } body

#
#ffffff #000000
#ffffff #eeeeee #dddddd #cccccc #bbbbbb #aaaaaa #999999
#888888 #777777 #666666 #555555 #444444 #333333
#222222 #111111
#ff0000
red#550000 dark red #220000
darker red #00ff00 green #0000ff blue
#ffff00 yellow #ff00ff
violet

body{ }
a:link, a:visited{
text-decoration: underline;
color: #336699;
}


text-decoration:
underline;color: #336699;

a:link
<a> </a> a:link
a:visited

a:link{
text-decoration: underline;
color: #336699;
}

a:visited{
text-decoration: underline;
color: #336699;
}
a:link a:visited text-decoration: underline;
color: #336699;

a:link, a:visited{ }
a:hover{
text-decoration: none;
}

a:link a:hover text-decoration:


color:

a:hover{
text-decoration: none;
color: #ff0000;
}

WordPress #11

WordPress
DIV Firefox
IE
Xampp Control
Firefox IE
index.phpstyle.css

750px

800px 600px 900px


100
750px
headercontainersidebar footer
750px DIV
<body> <div id="wrapper">
</body> </div>
style.css
#wrapper{
margin: 0 auto 0 auto;
width: 750px;
text-align: left;
}
CSS# id class
<div class="wrapper"> .wrapper
#wrapper wrapper DIV
index.php style.css Firefox IE F5

margin: 0 auto 0 auto; 0

width: 750px; 750


text-align: left; wrapper DIV
body{ text-align: left;} text-align: center;

body{} text-align: left; text-align: center;

Firefox Internet Explorer 6


IE
IE body{ text-align:
center; } wrapper DIV IE
Firefox IE

3
header
Header 750px
#header{
float: left;
width: 750px;
}

4
Container
Container 500px
#container{
float: left;
width: 500px;
}

5
Sidebar
Sidebar 240px

.sidebar{
float: left;
width: 240px;
background: #eeeeee;
}
#ffffff background: #eeeeee;
10

6
Footer
Footer 750px
#footer{
clear: both;
float: left;
width: 750px;
}
Header Footer footer{} clear: both;
Footer Sidebar Container

7
10
10 CSS
.sidebar{
float: left;
width: 240px;
background: #eeeeee;
margin: 0 0 0 10px;
}
10
margin: 0 0 0 10px; 000
100px

8
IE bug
Internet Explorer bug IE 20
2020

Container Sidebar 760px 750px


display: inline;
.sidebar{
float: left;
width: 240px;
background: #eeeeee;
margin: 0 0 0 10px;
display: inline;
}
index style

WordPress #12

WordPress
index.php
Xampp Controltheme
FirefoxInternet Explorer style.css

1
Reset CSS
style.css body{}
body, h1, h2, h3, h4, h5, h6, blockquote, p{
margin: 0;
padding: 0;
}
margin: 0; margin: 0 0 0 0;

Firefox IE

2
H1
body{}
h1{
font-family: Georgia, Sans-serif;

font-size: 24px;
padding: 0 0 10px 0;
}
font-family: Georgia, Sans-seriff; H1 Arial Georgia
Georgia Sans-serif
font-size: 24px; body{} 12pxH1 H2

padding: 0 0 10px 0; 10

#container{}

.post{
padding: 10px 0 10px 0;
}
class post DIV 10
.post h2{
font-family: Georgia, Sans-serif;
font-size: 18px;
}
.post h2 CSS class post DIV H2
H2
.entry{
line-height: 18px;
}
entry DIV

a:hover{}
p{
padding: 10px 0 0 0;
}
10 )

.entry{}
p.postmetadata{
border-top: 1px solid #ccc;
margin: 10px 0 0 0;
}
postmetadata 10
border-top border-left
border -top-right-bottom -left
border: 1px solid #ccc; 1

p.postmetadata{}
.navigation{
padding: 10px 0 0 0;
font-size: 14px;
font-weight: bold;
line-height: 18px;
}
Next page Previous page navigation DIV

10
14

18

WordPress #13

WordPress

XAMPPFirefoxIE style.css

.sidebar{}
.sidebar ul{
list-style-type: none;
margin: 0;
padding: 0 10px 0 10px;
}
UL UL UL
10

UL UL UL
UL

2
LI
.sidebar ul{}
.sidebar ul li{
padding: 10px 0 10px 0;
}

.sidebar ul li{} 10

UL
10
20
20 .sidebar ul{}

.sidebar ul li{}
.sidebar ul li h2{
font-family: Georgia, Sans-serif;

font-size: 14px;
}
.post{}
.post{}

WordPrss About
WordPress

1020
.sidebar ul li{} 4

4
UL LI
.sidebar ul li h2{}
.sidebar ul ul li{
padding: 0;
}

.sidebar ul ul li{} UL LIs


0 px

24px
line-height: 24px; .sidebar ul ul li{}.

IE form
body, h1, h2, h3, h4, h5, h6, address, blockquote, dd, dl, hr, p{
margin: 0;
padding: 0;
}

body, h1, h2, h3, h4, h5, h6, address, blockquote, dd, dl, hr, p, form{
margin: 0;
padding: 0;
}

id >

Calendar

TABLE wp-calendar id
style.css wp-calendar table
table#wp-calendar{} # id
class DIV table DIV id wpcalendar
#wp-calendar{} WordPress #wpcalendar
.sidebar ul li table#wp-calendar{} .sidebar ul
li#calendar table#wp-calendar{}. LI id
calendar
table width: 100%;
.sidebar ul ul li{}
table#wp-calendar{
width: 100%;
}

width: 100%;

TABLE

WordPress #14
Index
Index WordPress
index.php
style.css index.php
XAMPPFirefoxIEindex.php style.css

1
footer
footer DIV 10px

2
footer P
footer P 18px #footer p{}. CSS

3
header.php
header.php
index.php header DIV header.php

header.php index.php

4
index.php header.php
index.php index.php
<?php get_header(); ?>

WordPress header.php
PHP <?php include (TEMPLATEPATH . "/header.php"); ?>.

4
sidebar.php
4 sidebar.php
index.php Sidebar DIV sidebar.php

index.php <?php get_sidebar(); ?>.



sidebar.php

5
footer.php
footer.php
footer.php

header.phpsidebar.php footer.php
get_header()get_sidebar() get_footer()
indexstyleheadersidebarfooter

WordPress #15

WordPress
header.phpsidebar.php footer.php

index.php

1
archive.php

archive.php
index.php archive.php
archive.php
archive.php the_content the_excerpt
archive.php

archive.php index.php

-- Google

--
archive.php archive.php
index.php

category.php

2
search.php
search.php
archive.php search.php

search.php
index.php
1

3
page.php single.php
page.php single.php
index.php page.php single.php

4
page.php

page.php

page.php <?php the_content(); ?>


<?php link_pages("<p><strong>Pages:</strong> ", "</p>", "number"); ?>

<?php edit_post_link("Edit", "<p>", "</p>"); ?>


page.php postmetadata

page.php posts_nav_link()

About

postmetadata posts_nav_link()

page.php

5
single.php
single.php

single.php <?php the_content() ?>


<?php link_pages("<p><strong>Pages:</strong> ", "</p>", "number"); ?>

postmetadata <?php comments_popup_link(); ?>


<br /> postmetadata

singel.php BR
BR
<?php posts_nav_link(); ?>
<?php previous_post_link("? %link") ?> <?php next_post_link(" %link ?") ?>
posts_nav_link()

previous_post_link() next_post_link()

single.php

archive.phpsearch.phppage.php
single.php
archive.php search.php
Pages

Single.php comments_popup_link()
posts_nav_link()

WordPress #16

WordPress 2.7 WordPress 2.7 Thread


Comments WordPress 2.7 Thread Comments

WordPress

comments.php
WordPress WordPress Kubrick

1
comments.php
comments.php
comments.txt comments.php
comments.php

comments-template-css style.css
style.css #footer

3
single.php
single.php entry DIV
<div class="comments-template">
<?php comments_template(); ?>
</div>

comments_template() comments.php
comments.php

comments_template()
page.php

>

validator
Direct Input
Check

-- Home page
-- Archive pages
-- Category pages
-- Search result pages
-- Pages About
-- Single post view page
-- Single post with no comments
-- Single post with comments
-- Single post with must login message

-- Single post with no login required message


-- Password protected single post with
comments


OL

1
single.php comments-template DIV
comments_template() DIV

H2 Password Protected

comment_text()
CSS comments.php
CSS

WordPress

erdaoo WP Theme
erdaoo WP Theme
erdaoo WP Theme

1. PHPWPCSSPS
2.
3.

WP
WP WP
templates index.php
style.css index.php
WP
index.php

single.php --
page.php --
archive.php --
category.php --
search.php --
404.php -- 404
comments.php --

index.php
index.php

<html>
<head>
.........
</head>
<body>
.........
</body>
</html>
header.php
header.php

body

header WP
content WP

sidebar WP
footer WP
header
sidebar


<div id="header">

</div>
<div id="content">
</div>
<div id="sidebar">

</div>
<div id="footer">

</div>
div
header

TAB
<div id="header">
<h1><a href="<?php bloginfo('url');?>"><?php
bloginfo('name');?></a></h1>
<?php bloginfo('description');?>
</div>
id div id div
bloginfo() WP url name
description

-- header.php
WP
<?php get_header(); ?>
header.php

content


<div id="content">
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<?php endwhile; ?>
<?php endif; ?>
</div>
if(have_posts() while
the_post()

div
<div id="content">
<?php if(have_posts()) : ?><!---->
<?php while(have_posts()) : the_post(); ?><!--
-->
<div class="post">
<h2><a href="<?php the_permalink();?>"><?php the_title();?></a></h2><!--->
<div class="entry">
<?php the_content();?><!---->
<p class="postmetadata"><!--Metadata-->
<?php _e('Filed under:');?>
<?php the_category(',');?><!---->
<?php _e('by');?><!--_e()-->
<?php the_autnor('');?><!---->
<br />
<?php comments_poopup_link('No Comments?','1 Comments?','%
Comment?');?><!--
-->
<?php edit_post_link('Edit','|','');?><!--
-->
</p>
</div><!---->
</div><!---->
<?php endwhile; ?>
<?php endif; ?>
</div>

class
class id id
class
id="header"
class="entry"
id class
style.css

Not Found

<?php else:?>
<div class="post" id="post-<?php the_ID(); ?>">
<?php _e('Not Found');?>
</div>
<?php endwhile; ?>

WP 10
11
10

<?php endif; ?>


<div class="navigation">
<?php posts_nav_link(); ?>
</div>

posts_nav_link() WP <? posts_nav_link('in


between','before','after')12
3

<?php get_header(); ?>


<div id="content">
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<div class="post">
<h2><a href="<?php the_permalink();?>"><?php the_title();?></a></h2>
<div class="entry">
<?php the_content();?>
<p class="postmetadata">
<?php _e('Filed under:');?>
<?php the_category(',');?>
<?php _e('by');?>
<?php the_autnor('');?>
<br />
<?php comments_poopup_link('No Comments?','1 Comments?','%
Comment?');?>
<?php edit_post_link('Edit','|','');?>
</p>
</div>
</div>
<?php endwhile; ?>
<div class="navigation">
<?php posts_nav_link(); ?>
</div>
<?php else:?>
<div class="post" id="post-<?php the_ID(); ?>" >
<?php _e('Not Found');?>
</div>
<?php endif; ?>
</div>
</body>
</html>
*********************************************************************************************

*********************************************************************************************

<UL><LI>!!!!!!!
<div class="sidebar"><!--id-->
<ul>
<li>
<h2><?php _e('''); ?></h2>
</li>
</ul>
</div>
UL OL

<div class="sidebar">
<ul>
<li><h2><?php _e(''); ?></h2>
<ul>
<?php wp_list_cats
('sort_column=name&optioncount=1&hierarchical=0'); ?>
</ul>
</li>
</ul>
</div>
wp_list_cats() &

sort_column=name --
optioncount=1 --
hierarchial=0 --
WP

<?php wp_list_pages('depth=3&title_li="<h2></h2>"'); ?>

depht=3
PHP WP

HTML
<li><h2><?php _e(''); ?</h2>
<ul>
<?php wp_list_cats
('sort_column=name&optioncount=1&hierarchical=0'); ?>
</ul>
</li>

<li><h2></h2>
<ul>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
...............................
</li>

</ul>

<li><h2><?php _e(''); ?></h2>


<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
wp_get_archives() 'type=monthly'

<?php get_links_list(); ?>


WP

<li id="search">
<?php include(TEMPLATEPATH. '/searchform.php'); ?>
</li>
include() TEMPLATEPATH
searchform.php

<li id="calendar">
<h2><?php _e(''); ?></h2>
<?php get_calendar(); ?>
</li>

<li>
<h2><?php _e(''); ?></h2>
<ul>
<?php wp_register(); ?>
<li>
<?php wp_loginout(); ?>
</li>
<?php wp_meta(); ?>
</ul>
</li>
wp_loginout()

wp_register()

wp_meta()
WordPress hook

<?php
/* Widgetized sidebar, if you have the plugin installed. */
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
<ul>
</ul>

<?php endif; ?>


WP2.0 Widget
WP

function_exists('dynamic_sidebar') || !dynamic_sidebar())
-- functions.php .
WP

-sidebar.phpindex.php
<?php get_sidebar(); ?>

<?php get_footer();?>
footer.php PHP

index.php
<?php get_header(); ?>
<div id="content">
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<div class="post">
<h2><a href="<?php the_permalink();?>"><?php the_title();?></a></h2>
<div class="entry">
<?php the_content();?>
<p class="postmetadata">
<?php _e('Filed under:');?>
<?php the_category(',');?>
<?php _e('by');?>
<?php the_autnor('');?>
<br />
<?php comments_poopup_link('No Comments?','1 Comments?','%
Comment?');?>
<?php edit_post_link('Edit','|','');?>
</p>

</div>
</div>
<?php endwhile; ?>
<div class="navigation">
<?php posts_nav_link(); ?>
</div>
<?php else:?>
<div class="post" id="post-<?php the_ID(); ?>" >
<?php _e('Not Found');?>
</div>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer();?>
index.php
WP

index.phparchive.php the_content
the_excerpt

archive.php search.php

index.php page.php <?php


the_content(); ?>
<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number');
?>

<?php edit_post_link('Edit', '<p>', '</p>'); ?>

<p class="postmetadata"> </p>

<div class="navigation">
<?php posts_nav_link(); ?>
</div>

index.phpsingle.php
<?php the_content(); ?>
<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number');
?>

<br />
<?php comments_poopup_link('No Comments?','1 Comments?','%
Comment?');?>
<?php posts_nav_link(); ?> <?php previous_post_link('? %link') ?> <?php
next_post_link(' %link ?') ?>

single.php <div class="entry"> </div>

<div class="comments-template">
<?php comments_template(); ?>
</div>
comments_template() WP comments.php
comments.php


Hostev Studios
Hostev Studios WordPress

Hostev Studios

(TW) Standard
Hostev Studios Standard
1GB 10GB 2 5
WordPress Hostev Studios 256
SSL cPanel
Hostev Studios
WordPress

(TW) Professional

Professional

2GB
10GB 20GB
10 N

10

(US)

Beginner

920

1,720

200MB

6,000MB

Standard

2,170

4,160

1GB

10,000MB

Professional

3,640

6,910

2GB

20,000MB

10

10

Hostev Studios PayPalATM

PayPal
Hostev Studios Email:
Pserics@gmail.com MSN: j@go2.tw

You might also like