wordpress
database guinong
table user id username password ( 1 , me , sudome )
wp-login.php
index.php > single.php > page.php > archive.php > search.php > 404.php
# header.php #
# index.php # sidebar.php #
# footer.php #
single.php 单一日志文件,用于显示单一日志
page.php 页面模板文件,用于显示静态页面
archive.php 存档文件,用于显示存档文件
category.php类别文件,用于显示类别页面
search.php 搜索文件,用于显示搜索结果
404.php 错误文件,用于显示404页面
comments.php评论文件,用于显示评论和评论框
category
{
cat_ID;
cat_name;
category_nicename; # slug
category_description;
category_parent;
category_count;
}
bloginfo('url')
bloginfo('name')
bloginfo('description')
if(have_posts()) # checks to see if you hava any post
while(have_posts()) # if you do have it, while you have any post,
execute the_post()
the_post() # call for the posts to be displayed
endwhile # this is to close while()
endif # close if
#functions.php
{{{
<?php
add_action('wp+print_style', 'add_my_stylesheet');
function add_my_stylesheet() {
$bluetrip_path = '/wp_content/themes/bluetrip/css/';
$bluetrip_screen = 'screen.css' ;
$bluetrip_print ='print.css' ;
$bluetrip_ie = 'ie.css' ;
$bluetrip_style = 'style.css' ;
// screen.css
$filename = $bluetrip_path.$bluetrip_screen ;
if( file_exists($filename) ) {
wp_register_style('myStyleSheets', $filename) ;
}
// print.css
$filename = $bluetrip_path.$bluetrip_print ;
if( file_exists($filename) ) {
wp_register_style('myStyleSheets', $filename) ;
}
// ie.css
$filename = $bluetrip_path.$bluetrip_ie ;
if( file_exists($filename) ) {
wp_register_style('myStyleSheets', $filename) ;
}
// style.css
$filename = $bluetrip_path.$bluetrip_style ;
if( file_exists($filename) ) {
wp_register_style('myStyleSheets', $filename) ;
}
}
?>