wordpressЦԒ
l(f)rg:2017-02-15 Դ: ĬЦԒ c
wordpressЦԒƪһz-blogDƵwordpress
ܶф͵ĕrDzÇ(ni)(yu)IJϵy(tng)Z-BLOGһΕrg^ܶ˶DƵwordpress,NDԭܶWҪԭZ-BLOGٷLrgMоSoҶ֪һMoeõ_Դϵy(tng)SrgƲ©ԽԽʧȥ˹ٷľSo@ϵy(tng)K̭
WҲھW(wng)˺ܶDƷİYҵһЩY_ʼDƣD^вôp^ܶ}eDϵy(tng)^URLַʧЧ}}}@SEOǘOĴ
DƜʂ䣺Dǰȫվ(sh)(j)òҪڮǰgMDُIһg(sh)(j)^ȥµDơľDʧӰ푾W(wng)վLԼDʧԶΜyԇ_ЧѾW(wng)վDƵĕrg⿴HH½10Чrg
ע⣺ՈُIlinuxC
Z-BLOGϵy(tng)ȫ(sh)(j)dZ-BLOGDƵwp-movabletypeDƹ
Z-BLOGbMZblogĺ_ı،ZPIļx(movabletype.zip)ȻύDʾbɺò
MȻΓmovabletype߅ĹMЃ(ni)ݵČDʾ غڶ
@WҪcf(sh)(j)v
͌WIJͶĿ퓵ĸʽ غڶ
ҾֻзΌwļ£
rԌ˺uՓ(ni)ݵԼҪMxcύͿψDʾļֻҪĕr]ЈeǾһ]}
WordPressϵy(tng)딵(sh)(j)딵(sh)(j)֮ǰՈOWPĹ̶朽ӣ
֮ǰWă(ni)퓵ַ飺 غڶ
eע⣺ՈُIlinuxCWindowsCWPϵy(tng)ԄڵַǰϙĿcategoryڃ(yu)ǰrcyǸWP@헹ܡ磺[/url]/post/123.html .bȥcategory,WP No Category Base C WPML compatible
MWordPress_ߡ롪Movable Type and TypePadxɺõġ*.aspȻΓςļDʾ
ע⣺@ʾļĴС20M(j)ͬĿgСͬZblog^࣬ɵļ^ô҂Է֞β(ע_ȱ)¹100ƪС30Mô҂ǰ50ƪɺ50ƪwe15M(ni)ȻςWordPress
غڶ
eע⣺wordpress
ڌ딵(sh)(j)֮ǰՈ_J±Ԅѽ(jng)°bwpѽ(jng)l(f)ԄID̖ѽ(jng)Ǐ1_ʼˡϔ(sh)(j)ȫeλô鿴أذbNavicat for MySQL (sh)(j)͑ˣٶһ¼ҵƽ棩ֱʹÿgṩھ(sh)(j)鿴鿴WP(sh)(j)wp_postsD
;СԄf(sh)ֵ0ôҪԓԄֵMYSQL(sh)(j)ԄֵSQLZDɫĔ(sh)(j)úx(zh)м
غڶ
wordpressЦԒƪwordpress(yu)^ ȥϢ wordpressȥgenerator
wordpressĬJr^F(xin)ܶƽròhtmla:
ƴaa:
<link rel="alternate" type="application/rss+xml" title="RSS 2.0 - all posts" href="http://blog.jb51.net/feed" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0 - all comments" href="http://blog.jb51.net/comments/feed" />
<link rel="pingback" href="http://blog.jb51.net/xmlrpc.php" />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://blog.jb51.net/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://blog.jb51.net/wp-includes/wlwmanifest.xml" />
<link rel='index' title='SBM Stone Crusher Machine|Grinding Mill' href='http://blog.jb51.net' /> <meta name="generator" content="WordPress 3.4" />
Ę˺generator¶IJͳõĂ汾@Ϣй©Еr͵İȫa(chn)һӰͬrҲҪ@ôЩ˺
ȥһЩõĘ˺W(wng)зf}Ŀµ functions.php´a:
ƴaa:
function wpbeginner_remove_version() {
return ”;
}
add_filter('the_generator', 'wpbeginner_remove_version');//wordpressİ汾̖
remove_action('wp_head', 'feed_links', 2);// ºuՓfeed
remove_action('wp_head', 'index_rel_link');//ǰµ
remove_action('wp_head', 'wlwmanifest_link'); // ⲿwindows live writer remove_action('wp_head', 'feed_links_extra', 3);// ~feedcategory, tag remove_action('wp_head', 'start_post_rel_link', 10, 0);// _ʼƪ
remove_action('wp_head', 'parent_post_rel_link', 10, 0);// ƪ
remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0); // ϡƪ.
yԇȥwordpressgeneratorЩa߀ȥ߀킀һֱӵķ
wodpressĿwp-includesĿµdefault-filters.php180У
ƴaa:
//add_action( 'wp_head', 'feed_links', 2 );
//add_action( 'wp_head', 'feed_links_extra', 3 );
//add_action( 'wp_head', 'rsd_link' );
//add_action( 'wp_head', 'wlwmanifest_link' );
//add_action( 'wp_head', 'index_rel_link' );
//add_action( 'wp_head', 'parent_post_rel_link', 10, 0 );
//add_action( 'wp_head', 'start_post_rel_link', 10, 0 );
//add_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
add_action( 'wp_head', 'locale_stylesheet' );
add_action( 'publish_future_post', 'check_and_publish_future_post', 10, 1 );
add_action( 'wp_head', 'noindex', 1 );
add_action( 'wp_head', 'wp_print_styles', 8 );
add_action( 'wp_head', 'wp_print_head_scripts', 9 );
//add_action( 'wp_head', 'wp_generator' );
//add_action( 'wp_head', 'rel_canonical' );
add_action( 'wp_footer', 'wp_print_footer_scripts' );
//add_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );
add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 );
Ҫֱ//עጵһ㿴¾͑ԓʲô˼ġ@ӿԱChtml^Ĵaȥwordpressgenerator˺
wordpressЦԒƪwordpressY
Wordpress}
I(y)оһwordpress״ν|ԓܛҲ״˽PHP_ʼF(xin)ѽ(jng)(jng)v˺LrgǾwоcʲôՈ߅ĿY鱾ˌڽ^Be,ϱeеǷNʲôԸMдĸ׃оĶAҲεġ
һwordpressĻA֪R˽
1B
WordpressͳõܛֱӬF(xin)еģ
ʹúܷɞ鲩ԼһЩW(wng)վğܛ_l(f)h(hun)]ʹXAMPPܛ֧ApacheMy SQLfilezillaҪʹphpZ ע
2XAMPPܛb^̲E
1 db≺һűPж
2 ≺֮capache_start.batļF(xin)ʾo
\80֘ӣf80˿ڱռ@rҪapache
˿ڣļAapacheconfhttpd.conf_ļе80ij
̖8080Ȼٴcapache_start.batļ߀
ʾ˿ڷæҳF(xin)443(sh)֣f443ռMģ
xampp/apache/conf/extra/httpd-ssl.conf_е443ij
4433ɡ
3 σɂEٴ\apache_start.bat\гɹ
4 cmysql_start.bat,MySQL
5 Ҳֱcxampp-control.exe
ڏxApacheMySqlքecStart
6Ȼͨ^http://localhost:8080/phpmyadmin/8080nj80ijɵĶ˿Ը(j)ԼMиģM֮½(sh)(j)wordpress
(sh)(j)ĬJ~̖root
ܴa
7wordpress≺֮xampp/htdocsݔW(wng)ַҪMһϵеOx(sh)(j)wordpressÑܴa߅ݔMһ퓣OõÑܴaԼOãԼӛ
˞ֹb
ģAΣ
ģA@Ͳ^ԔؽBҪfһʹõ^Ć}ԼQk
1}{(dio)ҲǬF(xin)ģ{(dio)xappearance^-theme}ȻЎׂԎģ壬ȻҲͨ^install themesb}ԼOӋõģdģcģ·activeҪʹõ}ģݔhttp://localhost:8080/wordpress/MW(wng)վwĘʽ䲼֡
2^bannerDƬҪQɺԼľW(wng)վϵĈDƬôkأܺappearance^-header^xԼҪĈDƬ֮ˢŴ_ǰ_^Dzѽ(jng)׃ԼςĈDƬ
^@ʾ(ni)ݵĸģsettingsOã@Ҫĵă(ni)Mļ
3ҪĘʽˡ
^widgetġ߅Ҫ@ʾă(ni)MOá
ӡ՚ve°l(f)¡uՓȣ@Щ@ʾĘ}߀Ը(j)ԼrMO
4Oқ]ʹmenusMOͨ^header.php
<?php
if($options['menu_type'] == 'categories') {
wp_list_categories('depth=2&title_li=0&orderby=name&show_count=0');
} else {
wp_list_categories('depth=2&title_li=0&sort_column=menu_order');
wp_list_pages('depth=2&title_li=0&sort_column=menu_order');
}
?>
F(xin)Ŀ͆{(dio)ãwp_list_categories{(dio)÷Ŀ҂ͨ^Postsl(f)ˎׂa(chn)Ʒ֪Rwea(chn)Ʒ֪R@rwp_list_categories܉{(dio)a(chn)Ʒ֪R@}wp_list_pages{(dio)ÆҲ҂Pagesаl(f)}
5ΌеhomeijZԵheader.phpеĴaMģ
<ul class="menu-header">
<li class="<?php echo($home_menu); ?>"><a class="home"
title="" href="<?php echo
get_settings('home'); ?>/"></a></li>
<?php
if($options['menu_type'] == 'categories') {
wp_list_categories('depth=2&title_li=0&orderby=name&show_count=0');
} else {
wp_list_pages('depth=2&title_li=0&sort_column=menu_order');
}
?>
</ul>
@njhomeij˶ZġゃҲԸijκZԵ
@Ҫѵǣ
ijɶZ@ӵһҪע⌢ļľaijutf-8@Ӟg[܉ReȻЩg[Re˵@ʾĕǁya
@ܶõĶֱ{(dio)õphp(sh)(sh)҂ҪĘʽԒͿԴļҵidclassȻٵstyle.cssM鿴Դļhʹ܉ֱcǾͿR֪idclassĞg[hʹùȸg[cijһKcIԪͿ@ʾaܷ
Z,ҲǰӢĵĻĵĸijZloop.phpfunction.phpMļ
֪ԓôwֻsearch form.phpļֱӓQĴaͿ܉ԄȡĬJʽ
<form method="get" id="searchform" action="<?phpbloginfo('url'); ?>/">
<input type="text" value="<?phpthe_search_query(); ?>" name="s" id="s" /> <input t(:www.zuancaijixie.com ѹӢ ժ:wordpressЦԒ)ype="submit" id="searchsubmit" value="<?php _e(''); ?>" /> </form>
<?php _e();?>˼@ʾuՓģģ
ɷN
a xampp\htdocs\wordpress\wp-includes\comment-template.php_ҵuՓģĴaMģ
$fields = array(
'author' => '<p class="comment-form-author">' . '<label for="author">' .__( 'ާ' ) . '</label>' .( $req ? '<span class="required">*</span>' :
'' ) .
'<input id="author" name="author" type="text" value="' .esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req .' /></p>',
'email' => '<p class="comment-form-email"><label for="email">' . __( 'E-mail' ) . '</label>' .( $req ? '<span class="required">*</span>' : '' ) .
'<input id="email" name="email" type="text" value="' .esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req .' /></p>',
'url' => '<p class="comment-form-url"><label for="url">' . __( 'ӧ֧-ѧۧ' ) . '</label>' .
'<input id="url" name="url" type="text" value="' .esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',
$required_text = sprintf( ' ' . __('Required fields are marked %s'), '<span ); class="required">*</span>' );
$defaults = array( 'fields'
=>apply_filters( 'comment_form_default_fields', $fields ),
'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'ܧާާ֧ߧѧڧ
', 'noun' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',
must be 'must_log_in' => '<p class="must-log-in">' .sprintf( __( 'You <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
'logged_in_as'=> '<p class="logged-in-as">' .sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s"
title="Log out of this account">Log out?</a>' ),
P~ЦԒ wordpress ЦԒwordpress} wordpressģ
cx