{"id":958,"date":"2013-01-24T16:43:19","date_gmt":"2013-01-24T08:43:19","guid":{"rendered":"https:\/\/sdeno.com\/?p=958"},"modified":"2013-01-24T16:43:19","modified_gmt":"2013-01-24T08:43:19","slug":"wordpress-%e8%af%a6%e7%bb%86%e4%b8%bb%e9%a2%98%e5%88%b6%e4%bd%9c%e6%95%99%e7%a8%8b%e7%9b%b8%e5%85%b3%e5%87%bd%e6%95%b0","status":"publish","type":"post","link":"https:\/\/sdeno.com\/?p=958","title":{"rendered":"wordpress \u8be6\u7ec6\u4e3b\u9898\u5236\u4f5c\u6559\u7a0b\u76f8\u5173\u51fd\u6570"},"content":{"rendered":"<p>WordPress\u57fa\u672c\u6a21\u677f\u6587<br \/>\n\u4e00\u822c\u9ed8\u8ba4\u4e3b\u9898\u6587\u4ef6\u662f\u8fd9\u4e2a\u76ee\u5f55\u4e0b\\wp-content\\themes\\\u4f60\u7684\u4e3b\u9898\u6587\u4ef6\u540d\\<br \/>\n\u4e00\u5957\u5b8c\u6574\u7684WordPress\u6a21\u677f\u5e94\u81f3\u5c11\u5177\u6709\u5982\u4e0b\u6587\u4ef6\uff1a<br \/>\nstyle.css : CSS(\u6837\u5f0f\u8868)\u6587\u4ef6<br \/>\nindex.php : \u4e3b\u9875\u6a21\u677f<br \/>\narchive.php : Archive\/Category\u6a21\u677f<br \/>\n404.php : Not Found \u9519\u8bef\u9875\u6a21\u677f<br \/>\ncomments.php : \u7559\u8a00\/\u56de\u590d\u6a21\u677f<br \/>\nfooter.php : Footer\u6a21\u677f<br \/>\nheader.php : Header\u6a21\u677f<br \/>\nsidebar.php : \u4fa7\u680f\u6a21\u677f<br \/>\npage.php : \u5185\u5bb9\u9875(Page)\u6a21\u677f<br \/>\nsingle.php : \u5185\u5bb9\u9875(Post)\u6a21\u677f<br \/>\nsearchform.php : \u641c\u7d22\u8868\u5355\u6a21\u677f<br \/>\nsearch.php : \u641c\u7d22\u7ed3\u679c\u6a21<\/p>\n<p>\u57fa\u672c\u6761\u4ef6\u5224\u65adtag<br \/>\nis_home() : \u662f\u5426\u4e3a\u4e3b\u9875<br \/>\nis_single() : \u662f\u5426\u4e3a\u5185\u5bb9\u9875(Post)<br \/>\nis_page() : \u662f\u5426\u4e3a\u5185\u5bb9\u9875(Page)<br \/>\nis_category() : \u662f\u5426\u4e3aCategory\/Archive\u9875<br \/>\nis_tag() : \u662f\u5426\u4e3aTag\u5b58\u6863\u9875<br \/>\nis_date() : \u662f\u5426\u4e3a\u6307\u5b9a\u65e5\u671f\u5b58\u6863\u9875<br \/>\nis_year() : \u662f\u5426\u4e3a\u6307\u5b9a\u5e74\u4efd\u5b58\u6863\u9875<br \/>\nis_month() : \u662f\u5426\u4e3a\u6307\u5b9a\u6708\u4efd\u5b58\u6863\u9875<br \/>\nis_day() : \u662f\u5426\u4e3a\u6307\u5b9a\u65e5\u5b58\u6863\u9875<br \/>\nis_time() : \u662f\u5426\u4e3a\u6307\u5b9a\u65f6\u95f4\u5b58\u6863\u9875<br \/>\nis_archive() : \u662f\u5426\u4e3a\u5b58\u6863\u9875<br \/>\nis_search() : \u662f\u5426\u4e3a\u641c\u7d22\u7ed3\u679c\u9875<br \/>\nis_404() : \u662f\u5426\u4e3a \u201cHTTP 404: Not Found\u201d \u9519\u8bef\u9875<br \/>\nis_paged() : \u4e3b\u9875\/Category\/Archive\u9875\u662f\u5426\u4ee5\u591a\u9875\u663e<\/p>\n<p>Header\u90e8\u5206\u5e38\u7528\u5230\u7684php\u51fd\u6570<\/p>\n<p>[code]&lt;?php bloginfo(\u2019name\u2019); ?&gt; : \u535a\u5ba2\u540d\u79f0(Title)<br \/>\n&lt;?php bloginfo(\u2019stylesheet_url\u2019); ?&gt; : CSS\u6587\u4ef6\u8def\u5f84<br \/>\n&lt;?php bloginfo(\u2019pingback_url\u2019); ?&gt; : PingBack Url<br \/>\n&lt;?php bloginfo(\u2019template_url\u2019); ?&gt; : \u6a21\u677f\u6587\u4ef6\u8def\u5f84<br \/>\n&lt;?php bloginfo(\u2019version\u2019); ?&gt; : WordPress\u7248\u672c<br \/>\n&lt;?php bloginfo(\u2019atom_url\u2019); ?&gt; : Atom Url<br \/>\n&lt;?php bloginfo(\u2019rss2_url\u2019); ?&gt; : RSS 2.o Url<br \/>\n&lt;?php bloginfo(\u2019url\u2019); ?&gt; : \u535a\u5ba2 Url<br \/>\n&lt;?php bloginfo(\u2019html_type\u2019); ?&gt; : \u535a\u5ba2\u7f51\u9875Html\u7c7b\u578b<br \/>\n&lt;?php bloginfo(\u2019charset\u2019); ?&gt; : \u535a\u5ba2\u7f51\u9875\u7f16\u7801<br \/>\n&lt;?php bloginfo(\u2019description\u2019); ?&gt; : \u535a\u5ba2\u63cf\u8ff0<br \/>\n&lt;?php wp_title(); ?&gt; : \u7279\u5b9a\u5185\u5bb9\u9875(Post\/Page)\u7684\u6807\u9898[\/code]<\/p>\n<p>\u6a21\u677f\u5e38\u7528\u7684PHP\u51fd\u6570\u9e21\u547d\u4ee4<\/p>\n<p>[code]&lt;?php get_header(); ?&gt; : \u8c03\u7528Header\u6a21\u677f<br \/>\n&lt;?php get_sidebar(); ?&gt; : \u8c03\u7528Sidebar\u6a21\u677f<br \/>\n&lt;?php get_footer(); ?&gt; : \u8c03\u7528Footer\u6a21\u677f<br \/>\n&lt;?php the_content(); ?&gt; : \u663e\u793a\u5185\u5bb9(Post\/Page)<br \/>\n&lt;?php if(have_posts()) : ?&gt; : \u68c0\u67e5\u662f\u5426\u5b58\u5728Post\/Page<br \/>\n&lt;?php while(have_posts()) : the_post(); ?&gt; : \u5982\u679c\u5b58\u5728Post\/Page\u5219\u4e88\u4ee5\u663e\u793a<br \/>\n&lt;?php endwhile; ?&gt; : While \u7ed3\u675f<br \/>\n&lt;?php endif; ?&gt; : If \u7ed3\u675f<br \/>\n&lt;?php the_time(\u2019\u5b57\u7b26\u4e32\u5b57\u7b26\u4e32\u5b57\u7b26\u4e32\u5b57\u7b26\u4e32\u2019) ?&gt; : \u663e\u793a\u65f6\u95f4\uff0c\u65f6\u95f4\u683c\u5f0f\u7531\u201c\u5b57\u7b26\u4e32\u201d\u53c2\u6570\u51b3\u5b9a\uff0c\u5177\u4f53\u53c2\u8003PHP\u624b\u518c<br \/>\n&lt;?php comments_popup_link(); ?&gt; : \u6b63\u6587\u4e2d\u7684\u7559\u8a00\u94fe\u63a5\u3002\u5982\u679c\u4f7f\u7528 comments_popup_script() \uff0c\u5219\u7559\u8a00\u4f1a\u5728\u65b0\u7a97\u53e3\u4e2d\u6253\u5f00\uff0c\u53cd\u4e4b\uff0c\u5219\u5728\u5f53<br \/>\n\u524d\u7a97\u53e3\u6253\u5f00<br \/>\n&lt;?php the_title(); ?&gt; : \u5185\u5bb9\u9875(Post\/Page)\u6807\u9898<br \/>\n&lt;?php the_permalink() ?&gt; : \u5185\u5bb9\u9875(Post\/Page) Url<br \/>\n&lt;?php the_category(\u2019, \u2018) ?&gt; : \u7279\u5b9a\u5185\u5bb9\u9875(Post\/Page)\u6240\u5c5eCategory<br \/>\n&lt;?php the_author(); ?&gt; : \u4f5c\u8005<br \/>\n&lt;?php the_ID(); ?&gt; : \u7279\u5b9a\u5185\u5bb9\u9875(Post\/Page) ID<br \/>\n&lt;?php edit_post_link(); ?&gt; : \u5982\u679c\u7528\u6237\u5df2\u767b\u5f55\u5e76\u5177\u6709\u6743\u9650\uff0c\u663e\u793a\u7f16\u8f91\u94fe\u63a5<br \/>\n&lt;?php get_links_list(); ?&gt; : \u663e\u793aBlogroll\u4e2d\u7684\u94fe\u63a5<br \/>\n&lt;?php comments_template(); ?&gt; : \u8c03\u7528\u7559\u8a00\/\u56de\u590d\u6a21\u677f<br \/>\n&lt;?php wp_list_pages(); ?&gt; : \u663e\u793aPage\u5217\u8868<br \/>\n&lt;?php wp_list_categories(); ?&gt; : \u663e\u793aCategories\u5217\u8868<br \/>\n&lt;?php next_post_link(\u2019 %link \u2018); ?&gt; : \u4e0b\u4e00\u7bc7\u6587\u7ae0\u94fe\u63a5<br \/>\n&lt;?php previous_post_link(\u2019%link\u2019); ?&gt; : \u4e0a\u4e00\u7bc7\u6587\u7ae0\u94fe\u63a5<br \/>\n&lt;?php get_calendar(); ?&gt; : \u65e5\u5386<br \/>\n&lt;?php wp_get_archives() ?&gt; : \u663e\u793a\u5185\u5bb9\u5b58\u6863<br \/>\n&lt;?php posts_nav_link(); ?&gt; : \u5bfc\u822a\uff0c\u663e\u793a\u4e0a\u4e00\u7bc7\/\u4e0b\u4e00\u7bc7\u6587\u7ae0\u94fe\u63a5<br \/>\n&lt;?php include(TEMPLATEPATH . \u2018\/\u6587\u4ef6\u540d\u6587\u4ef6\u540d\u6587\u4ef6\u540d\u6587\u4ef6\u540d\u2019); ?&gt; : \u5d4c\u5165\u5176\u4ed6\u6587\u4ef6\uff0c\u53ef\u4e3a\u5b9a\u5236[\/code]<\/p>\n<p>\u4e0e\u6a21\u677f\u76f8\u5173\u7684\u5176\u4ed6\u51fd<br \/>\n[code]&lt;?php _e(\u2019Message\u2019); ?&gt; : \u8f93\u51fa\u76f8\u5e94\u4fe1\u606f<br \/>\n&lt;?php wp_register(); ?&gt; : \u663e\u793a\u6ce8\u518c\u94fe\u63a5<br \/>\n&lt;?php wp_loginout(); ?&gt; : \u663e\u793a\u767b\u5f55\/\u6ce8\u9500\u94fe\u63a5<br \/>\n&lt;!\u2013next page\u2013&gt; : \u5c06\u5f53\u524d\u5185\u5bb9\u5206\u9875<br \/>\n&lt;!\u2013more\u2013&gt; : \u5c06\u5f53\u524d\u5185\u5bb9\u622a\u65ad\uff0c\u4ee5\u4e0d\u5728\u4e3b\u9875\/\u76ee\u5f55\u9875\u663e\u793a\u5168\u90e8\u5185\u5bb9<br \/>\n&lt;?php timer_stop(1); ?&gt; : \u7f51\u9875\u52a0\u8f7d\u65f6\u95f4(\u79d2)<br \/>\n&lt;?php echo get_num_queries(); ?&gt; : \u7f51\u9875\u52a0\u8f7d\u67e5\u8be2\u91cf[\/code]<\/p>\n<p>\u8fd9\u8282\u6211\u4eec\u63a5\u7740\u4e0a\u8282\uff0c\u7ee7\u7eed\u4ecb\u7ecd\u5982\u4f55\u5b9a\u4e49index.php\u4ee5\u53ca\u5982\u4f55\u6d3e\u751f\u51fa\u5176\u5b83\u6587\u4ef6\uff0c\u5728index.php\u6587\u4ef6\u4e2d\uff0c\u5728body\u5143\u7d20\u5185\uff0c\u65b0\u5efa\u5982\u4e0b\u7ed3\u6784\u5316\u6807\u8bb0\u5143\u7d20<br \/>\n\uff0c\u5404\u5143\u7d20\u90fd\u5e26\u6709\u4e0d\u540c\u7684id\u5c5e\u6027:<br \/>\n[code]&lt;div id=\u201dpage\u201d&gt;<br \/>\n&lt;div id=\u201dheader\u201d&gt;&lt;\/div&gt;<br \/>\n&lt; div id=\u201dcontent\u201d&gt;&lt;\/div&gt;<br \/>\n&lt; div id=\u201dsidebar\u201d&gt;&lt;\/div&gt;<br \/>\n&lt; div id=\u201dfooter\u201d&gt;&lt;\/div&gt;<br \/>\n&lt; \/div&gt;[\/code]<br \/>\n\u8fd9\u4e9b\u4e0d\u540c\u7684\u5c5e\u6027\uff0c\u5206\u522b\u4ee3\u8868\u7740\u4e0d\u540c\u7684\u533a\u57df\uff0c\u8ba9\u4eba\u4e00\u770b\u5c31\u77e5\u9053\u662f\u4ec0\u4e48\u610f\u601d\uff0c\u4e0b\u9762\u6211\u4eec\u91cd\u70b9\u63a2\u8ba8header,content,sidebar,footer\u90e8\u5206\u7684\u6784\u5efa\u3002<br \/>\n(\u4e00).\u6784\u5efaheader<br \/>\n[code]&lt;div id=\u201dheader\u201d&gt;&lt;\/div&gt; \u5143\u7d20\u7684\u4e24\u4e2a\u6807\u7b7e\u4e4b\u95f4\u8f93\u5165\u4e0b\u5217\u4ee3\u7801\uff1a<br \/>\n&lt;h1&gt;&lt;a href=\u201d&lt;?php bloginfo(\u2019url\u2019); ?&gt;\u201d title=\u201d&lt;?php bloginfo(\u2019name\u2019); ?&gt;\u201d&gt;&lt;?php bloginfo(\u2019name\u2019); ?&gt;&lt;\/a&gt;&lt;\/h1&gt;<br \/>\n&lt; p&gt;&lt;?php bloginfo(\u2019description\u2019); ?&gt;&lt;\/p&gt;[\/code]<br \/>\n\u8fd9\u91cc\u7528\u5230\u4e86 WP \u5185\u7f6e\u7684 bloginfo \u51fd\u6570\u6765\u751f\u6210\u5185\u5bb9\uff0c\u5176\u4e2d\uff1a<br \/>\nbloginfo(\u2019url\u2019)\u8fd4\u56de\u7f51\u7ad9\u4e3b\u9875\u94fe\u63a5\uff1b<br \/>\nbloginfo(\u2019name\u2019)\u8fd4\u56de\u7f51\u7ad9\u6807\u9898\uff1b<br \/>\nbloginfo(\u2019description\u2019)\u8fd4\u56de\u7f51\u7ad9\u63cf\u8ff0\u3002<br \/>\n\u4fdd\u5b58 index.php \u6587\u4ef6\uff0c\u7136\u540e\u5728\u6d4f\u89c8\u5668\u4e2d\u6309 F5 \u5237\u65b0\u4e00\u4e0b\u9875\u9762\uff0c\u770b\u80fd\u770b\u5230\u4ec0\u4e48\uff1f\u518d\u901a\u8fc7\u201c\u67e5\u770b\u6e90\u6587\u4ef6\u201d\uff0c\u6838\u5bf9\u4e00\u4e0b\u7531 WP \u7684 bloginfo() \u51fd\u6570<br \/>\n\u751f\u6210\u7684\u76f8\u5173\u4fe1\u606f\u3002<br \/>\n(\u4e8c).\u6784\u5efacontent<br \/>\n\u5728 &lt;div id=\u201dcontent\u201d&gt;&lt;\/div&gt; \u4e2d\uff0c\u6211\u4eec\u8981\u901a\u8fc7\u5faa\u73af\u663e\u793a\u535a\u6587\uff0c\u5305\u62ec\u6bcf\u4e2a\u535a\u6587\u7684\u6807\u9898\u3001\u4f5c\u8005\u3001\u53d1\u8868\u65e5\u671f\u4ee5\u53ca\u5176\u4ed6\u76f8\u5173\u4fe1\u606f\u3002\u5e76\u4e14\uff0c\u53ef\u4ee5\u5206<br \/>\n\u9875\u663e\u793a\u535a\u6587\uff08\u53d6\u51b3\u4e8e WP \u540e\u53f0\u7684\u8bbe\u7f6e\uff09\u3002<br \/>\n\u9996\u5148\uff0c\u5728 &lt;div id=\u201dcontent\u201d&gt; \u4e0e &lt;\/div&gt; \u4e4b\u95f4\u8f93\u5165\u4e0b\u5217\u4ee3\u7801\uff1a<br \/>\n[code]&lt;?php while (have_posts()) : the_post(); ?&gt; &lt;div class=\u201dpost\u201d id=\u201dpost-&lt;?php the_ID() ?&gt;\u201d&gt; [\/code]<br \/>\n&lt; !\u2013 \u535a\u6587\u6807\u9898\u53ca\u94fe\u63a5 \u2013&gt;<br \/>\n[code]&lt;h2&gt;&lt;a href=\u201d&lt;?php the_permalink() ?&gt;\u201d rel=\u201dbookmark\u201d title=\u201d&lt;?php the_title(); ?&gt;\u201d&gt; &lt; ?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/h2&gt;<br \/>\n&lt; !\u2013 \u53d1\u8868\u65e5\u671f \u2013&gt;<br \/>\n&lt;div class=\u201dpost-date\u201d&gt;<br \/>\n&lt;span class=\u201dpost-month\u201d&gt;&lt;?php the_time(\u2019M\u2019) ?&gt;&lt;\/span&gt;<br \/>\n&lt; span class=\u201dpost-day\u201d&gt;&lt;?php the_time(\u2019d\u2019) ?&gt;&lt;\/span&gt;<br \/>\n&lt; \/div&gt;<br \/>\n&lt; !\u2013 \u4f5c\u8005 \u2013&gt;<br \/>\n&lt;span class=\u201dpost-author\u201d&gt;&lt;?php _e(\u2019Author\u2019); ?&gt;\uff1a&lt;?php the_author(\u2019, \u2018) ?&gt;&lt;\/span&gt;<br \/>\n&lt; !\u2013 \u7c7b\u522b \u2013&gt;<br \/>\n&lt;span class=\u201dpost-cat\u201d&gt;&lt;?php _e(\u2019Categories\u2019); ?&gt;\uff1a&lt;?php the_category(\u2019, \u2018) ?&gt;&lt;\/span&gt;<br \/>\n&lt; !\u2013 \u6ce8\u91ca \u2013&gt;<br \/>\n&lt;span class=\u201dpost-comments\u201d&gt; &lt; ?php comments_popup_link(\u2019No Comments ?\u2019, \u20181 Comment ?\u2019, \u2018% Comments ?\u2019); ?&gt;&lt;\/span&gt;<br \/>\n&lt; !\u2013 \u5185\u5bb9 \u2013&gt;<br \/>\n&lt;div class=\u201dentry\u201d&gt;<br \/>\n&lt; ?php the_content(\u2019\u66f4\u591a\u5185\u5bb9 ?\u2019); ?&gt;<br \/>\n&lt; \/div&gt;<br \/>\n&lt; !\u2013 \u5176\u4ed6\u5143\uff08Meta\uff09\u6570\u636e \u2013&gt;<br \/>\n&lt;div class=\u201dpost-meta\u201d&gt;<br \/>\n&lt; ?php edit_post_link(\u2019\u7f16\u8f91\u2019,\u2019 | \u2018,\u201d); ?&gt;<br \/>\n&lt; \/div&gt; &lt;\/div&gt;<br \/>\n&lt; ?php endwhile; ?&gt;&lt;div class=\u201dnavigation\u201d&gt;<br \/>\n&lt;span class=\u201dprevious-entries\u201d&gt;&lt;?php next_posts_link(\u2019\u524d\u4e00\u7bc7\u2019) ?&gt;&lt;\/span&gt; &lt;span class=\u201dnext-entries\u201d&gt;&lt;?php<br \/>\nprevious_posts_link(\u2019\u540e\u4e00\u7bc7\u2019) ?&gt;&lt;\/span&gt;<br \/>\n&lt; \/div&gt;<br \/>\n&lt; ?php else : ?&gt;<br \/>\n&lt; div class=\u201dpost\u201d&gt;<br \/>\n&lt;h2&gt;&lt;?php _e(\u2019Not Found\u2019); ?&gt;&lt;\/h2&gt;<br \/>\n&lt; \/div&gt;&lt;?php endif; ?&gt;[\/code]<br \/>\n\u770b\u4f3c\u590d\u6742\uff0c\u5176\u5b9e\u4e0d\u7136\u3002\u9996\u5148\uff1a<br \/>\n[code]&lt;?php while (have_posts()) : the_post(); ?&gt;<br \/>\n&lt;?php endwhile; ?&gt;[\/code]<br \/>\n\u8fd9\u4e24\u884c\uff0c\u662f WP \u4e2d\u7684 while \u5faa\u73af\u3002\u5176\u4e2d\uff0cwhile \u8bed\u53e5\u901a\u8fc7\u6d4b\u8bd5 have_posts() \u51b3\u5b9a\u662f\u5426\u8c03\u7528 the_post() \u51fd\u6570\u3002\u5982\u679c\u6d4b\u8bd5 have_posts() \u8fd4<br \/>\n\u56de true\uff0c\u5219\u8c03\u7528 the_post() \u51fd\u6570\uff0c\u521d\u59cb\u5316\u4e0e\u535a\u6587\u76f8\u5173\u7684\u5185\u7f6e\u53d8\u91cf\u3002 \u5728 while \u5faa\u73af\u5185\u90e8\uff0c\u9996\u5148\u8981\u6ce8\u610f\u901a\u8fc7 div\u3001h2\u3001span \u8fd9\u4e09\u4e2a\u5143\u7d20\u5b9a<br \/>\n\u4e49\u7684\u5d4c\u5957\u8bed\u4e49\u7ed3\u6784\uff0c\u4ee5\u53ca\u76f8\u5e94\u5143\u7d20\u7684 class \u548c id \u5c5e\u6027\uff08\u5176\u4e2d\u53ea\u4e3a class \u4e3a post \u7684 div \u5143\u7d20\u5b9a\u4e49\u4e86\u4e00\u4e2a id \u5c5e\u6027\uff0d\uff0dpost-&lt;?php<br \/>\nthe_ID() ?&gt;\uff09\u3002\u8fd9\u662f\u5c06\u6765\u4f7f\u7528 CSS \u63a7\u5236\u5916\u89c2\u7684\u5173\u952e\u6240\u5728\u3002\u5728\u8fd9\u4e2a div \u5143\u7d20\u4e2d\uff0c\u4e3a\u663e\u793a\u535a\u6587\u7684\u76f8\u5173\u4fe1\u606f\uff0c\u5206\u522b\u8c03\u7528\u4e86\u4ee5\u4e0b WP \u51fd\u6570\uff1a<\/p>\n<p>the_ID()\uff1a\u8fd4\u56de\u535a\u6587 ID\uff1b<br \/>\nthe_permalink()\uff1a\u8fd4\u56de\u535a\u6587\u56fa\u5b9a\u94fe\u63a5 URL\uff1b<br \/>\nthe_title()\uff1a\u8fd4\u56de\u535a\u6587\u6807\u9898\uff1b<br \/>\nthe_time(\u2019M\u2019)\uff1a\u8fd4\u56de\u53d1\u8868\u65e5\u671f\u4e2d\u7684\u6708\u4efd\uff1b<br \/>\nthe_time(\u2019d\u2019)\uff1a\u8fd4\u56de\u53d1\u8868\u65e5\u671f\u4e2d\u7684\u5929\uff1b<br \/>\nthe_author()\uff1a\u8fd4\u56de\u535a\u6587\u4f5c\u8005\uff1b<br \/>\nthe_category()\uff1a\u8fd4\u56de\u535a\u6587\u7684\u7c7b\u522b\uff1b<br \/>\nthe_content()\uff1a\u8fd4\u56de\u535a\u6587\u7684\u5185\u5bb9\uff0c\u5176\u4e2d\u7684\u53c2\u6570\u8868\u793a\u7528\u4e8e\u201c\u66f4\u591a\u5185\u5bb9\u201d\u7684\u94fe\u63a5\u6587\u672c\uff1b \u4ee5\u4e0a\u51fd\u6570\u90fd\u662f\u4ee5 the_ \u5f00\u5934\u7684\uff0c\u52a0\u4e0a\u540e\u9762\u7684\u51fd\u6570\u540d\u4e0d\u4ec5<br \/>\n\u9887\u6709\u81ea\u89e3\u91ca\u7684\u5473\u9053\uff0c\u800c\u4e14\u4ee4\u4eba\u8054\u60f3\u5230 this \u5173\u952e\u5b57\u3002\u6b64\u5916 _e() \u51fd\u6570\u662f\u4e00\u4e2a\u5305\u88c5\u51fd\u6570\uff0c\u8fd9\u4e2a\u51fd\u6570\u4e3b\u8981\u7528\u4e8e\u8bed\u8a00\u7684\u8f6c\u6362\uff0c\u5982\u679c\u8c03\u7528\u8be5\u51fd\u6570\u5e76\u4f20<br \/>\n\u9012\u6807\u51c6\u7684 WP \u672f\u8bed\uff0c\u5982\uff1aAuthor \u6216 Categories\uff0c\u5219\u8fd4\u56de\u4f60\u76f8\u5e94\u8bed\u8a00\u5305\u4e2d\u7684\u8bd1\u6587\uff0c\u5728\u4e2d\u6587\u5305\u4e2d\u5206\u522b\u662f\u201c\u4f5c\u8005\u201d\u548c\u201c\u7c7b\u522b\u201d\u3002\u5f53\u7136\uff0c\u4e0d\u7528\u4e5f\u53ef<br \/>\n\u3002\u4f46\u4f1a\u5931\u53bb\u4e00\u4e9b\u9002\u5e94\u6027\u3002 \u8fd8\u6709\uff0comments_popup_link() \u548c edit_post_link() \u4e24\u4e2a\u51fd\u6570\uff0c\u5206\u522b\u663e\u793a\u6ce8\u91ca\u548c\u7f16\u8f91\u94fe\u63a5\uff0c\u8fd9\u91cc\u4e0d\u591a\u8bf4\u4e86\u3002 \u53e6\u5916<br \/>\n\uff0c\u5728 &lt;?php endwhile; ?&gt; \u540e\u9762\u663e\u793a\u4e86\u5206\u9875\u5bfc\u822a\u94fe\u63a5\uff0c\u8c03\u7528\u7684\u51fd\u6570\u5206\u522b\u662f\uff1anext_posts_link() \u548c previous_posts_link()\u3002\u6b64\u65f6\uff0c\u5982\u679c\u4f60<br \/>\n\u7684\u535a\u6587\u603b\u6570\u5c0f\u4e8e WP \u540e\u53f0\u8bbe\u7f6e\u7684\u6700\u591a\u663e\u793a\u6570\u76ee\uff0c\u6bd4\u5982\uff1a\u4f60\u5728\u540e\u53f0\u8bbe\u7f6e\u6700\u591a\u663e\u793a 5 \u7bc7\uff0c\u800c\u4f60\u6709 10 \u7bc7\u535a\u6587\uff0c\u5c31\u4f1a\u5206\u9875\u663e\u793a\uff1b\u5426\u5219\uff0c\u5982\u679c\u4f60\u7684\u535a<br \/>\n\u6587\u5c11\u4e8e\u6216\u7b49\u4e8e 5 \u7bc7\u5219\u770b\u4e0d\u5230\u5206\u9875\u5bfc\u822a\u94fe\u63a5\u3002 \u6700\u540e\uff0c\u4e0d\u8981\u4e22\u4e0b &lt;?php else : ?&gt; \u8bed\u53e5\u540e\u9762\u7684\u5185\u5bb9\uff1a<br \/>\n[code]&lt;div class=\u201dpost\u201d&gt;<br \/>\n&lt;h2&gt;&lt;?php _e(\u2019Not Found\u2019); ?&gt;&lt;\/h2&gt;<br \/>\n&lt;\/div&gt;[\/code]<br \/>\n\u663e\u7136\uff0c\u8fd9\u662f\u4e00\u4e2a\u9519\u8bef\u63d0\u793a\u4fe1\u606f\u3002<br \/>\n(\u4e09).\u6784\u5efasidebar<br \/>\nsidebar \u7684\u5185\u5bb9\u5f53\u7136\u8981\u5728 &lt;div id=\u201dsidebar\u201d&gt;&lt;\/div&gt; \u5143\u7d20\u4e2d\u6784\u5efa\u4e86\u3002sidebar\uff0c\u4e2d\u6587\u53eb\u4fa7\u8fb9\u680f\uff0c\u5176\u4e2d\u53ef\u4ee5\u5305\u542b\u5f88\u591a\u5185\u5bb9\u3002\u6bd4\u5982\uff1a\u5206\u7c7b\u3001\u9875<br \/>\n\u9762\u3001\u94fe\u63a5\u3001\u65e5\u5386\u7b49\u7b49\u5bfc\u822a\u53ca\u76f8\u5173\u4fe1\u606f\u3002 \u5728 WP \u4e2d\uff0csidebar \u4e2d\u7684\u5185\u5bb9\u90fd\u4ee5\u65e0\u5e8f\uff08ul\uff09\u6216\u6709\u5e8f\uff08ol\uff09\u5217\u8868\u7684\u5f62\u5f0f\u8f93\u51fa\u3002\u56e0\u6b64\uff0c\u9700\u8981\u5728 &lt;div<br \/>\nid=\u201dsidebar\u201d&gt;&lt;\/div&gt; \u4e2d\u8f93\u5165\u4ee5\u4e0b\u6807\u8bb0\uff1a<br \/>\n[code]&lt;ul&gt;<br \/>\n&lt; ?php if ( !function_exists(\u2019dynamic_sidebar\u2019) || !dynamic_sidebar() ) : ?&gt;<br \/>\n&lt; li id=\u201dsearch\u201d&gt;<br \/>\n&lt; ?php include(TEMPLATEPATH .\u2019\/searchform.php\u2019); ?&gt;<br \/>\n&lt; \/li&gt; &lt;li id=\u201dcalendar\u201d&gt;<br \/>\n&lt;h2&gt;&lt;?php _e(\u2019Calendar\u2019); ?&gt;&lt;\/h2&gt;<br \/>\n&lt; ?php get_calendar(); ?&gt;<br \/>\n&lt; \/li&gt; &lt;?php wp_list_pages(\u2019title_li=&lt;h2&gt;\u9875\u9762&lt;\/h2&gt;\u2019); ?&gt; &lt;li class=\u201dcatnav\u201d&gt;<br \/>\n&lt;h2&gt;&lt;?php _e(\u2019Categories\u2019); ?&gt;&lt;\/h2&gt;<br \/>\n&lt; ul&gt; &lt; ?php wp_list_cats(\u2019sort_column=name&amp;optioncount=1&amp;hierarchical=0\u2032); ?&gt;<br \/>\n&lt; \/ul&gt;<br \/>\n&lt; \/li&gt;<br \/>\n&lt; li class=\u201darchivesnav\u201d&gt;<br \/>\n&lt;h2&gt;&lt;?php _e(\u2019Archives\u2019); ?&gt;&lt;\/h2&gt;<br \/>\n&lt; ul&gt;<br \/>\n&lt; ?php wp_get_archives(\u2019type=monthly\u2019); ?&gt;<br \/>\n&lt; \/ul&gt;<br \/>\n&lt; \/li&gt;<br \/>\n&lt; li class=\u201dblogrollnav\u201d&gt;<br \/>\n&lt;h2&gt;&lt;?php _e(\u2019Links\u2019); ?&gt;&lt;\/h2&gt;<br \/>\n&lt; ul&gt;<br \/>\n&lt; ?php get_links(\u2019-1\u2032, \u2018&lt;li&gt;\u2019, \u2018&lt;\/li&gt;\u2019, \u2018&lt;br \/&gt;\u2019, FALSE, \u2018id\u2019, FALSE, FALSE, -1, FALSE); ?&gt;<br \/>\n&lt; \/ul&gt;<br \/>\n&lt; \/li&gt;<br \/>\n&lt; li class=\u201dmeta\u201d&gt;<br \/>\n&lt;h2&gt;&lt;?php _e(\u2019Meta\u2019); ?&gt;&lt;\/h2&gt;<br \/>\n&lt; ul&gt;<br \/>\n&lt;?php wp_register(); ?&gt;<br \/>\n&lt;li&gt;&lt;?php wp_loginout(); ?&gt;&lt;\/li&gt;<br \/>\n&lt; ?php wp_meta(); ?&gt;<br \/>\n&lt;\/ul&gt;<br \/>\n&lt; \/li&gt;<br \/>\n&lt; ?php endif ?&gt;<br \/>\n&lt; \/ul&gt; [\/code]<br \/>\n\u4ee5\u4e0a\u4ee3\u7801\u4ece\u7b2c\u4e09\u884c\u5f00\u59cb\uff0c\u5206\u522b\u901a\u8fc7\u5305\u542b searchform.php \u663e\u793a\u641c\u7d22\u8868\u5355\uff1b<\/p>\n<p>\u8c03\u7528 get_calendar() \u51fd\u6570\u663e\u793a\u65e5\u5386\uff1b<br \/>\n\u8c03\u7528 wp_list_pages() \u51fd\u6570\u663e\u793a\u9875\u9762\u5bfc\u822a\uff1b<br \/>\n\u8c03\u7528 wp_list_cats() \u51fd\u6570\u663e\u793a\u5206\u7c7b\u5bfc\u822a\uff1b<br \/>\n\u8c03\u7528 wp_get_archives() \u51fd\u6570\u663e\u793a\u5b58\u6863\u5bfc\u822a\uff1b<br \/>\n\u8c03\u7528 get_links() \u51fd\u6570\u663e\u793a\u94fe\u63a5\u5bfc\u822a\u3002<br \/>\n\u5728\u6784\u5efa\u4fa7\u8fb9\u680f\u65f6\uff0c\u8981\u4e3a\u751f\u6210\u641c\u7d22\u6846\u65b0\u5efa\u4e00\u4e2a searchform.php \u6587\u4ef6\uff0c\u5176\u5185\u5bb9\u5982\u4e0b\uff1a<br \/>\n[code]&lt;form method=\u201dget\u201d id=\u201dsearchform\u201d action=\u201d&lt;?php bloginfo(\u2019home\u2019); ?&gt;\/\u201d&gt;<br \/>\n&lt;div&gt;<br \/>\n&lt; input type=\u201dtext\u201d value=\u201d&lt;?php echo wp_specialchars($s, 1); ?&gt;\u201d name=\u201ds\u201d id=\u201ds\u201d size=\u201d15\u2033 \/&gt;<br \/>\n&lt;br \/&gt;<br \/>\n&lt; input type=\u201dsubmit\u201d id=\u201dsearchsubmit\u201d value=\u201dSearch\u201d \/&gt;<br \/>\n&lt; \/div&gt;<br \/>\n&lt; \/form&gt; [\/code]<\/p>\n<p>\u5c06\u5176\u4fdd\u5b58\u5728 myTheme \u6587\u4ef6\u5939\u4e2d\uff0c\u901a\u8fc7 include \u8bed\u53e5\u5305\u542b\u8fdb\u6765\u5c31\u53ef\u4ee5\u4e86\u3002\u6ce8\u610f\uff0c\u5e38\u91cf TEMPLATEPATH \u4e2d\u4fdd\u5b58\u7684\u662f\u6a21\u677f\u8def\u5f84\u3002 \u6700\u540e\uff0c\u8bf4\u660e\u4e00\u4e0b<br \/>\n\u4ee5\u4e0a\u4ee3\u7801\u7b2c\u4e8c\u884c\u548c\u5012\u6570\u7b2c\u4e8c\u884c\u3002\u663e\u7136\u8fd9\u662f\u4e00\u4e2a if \u8bed\u53e5\u5757\u3002\u90a3\u8fd9\u4e2a if \u8bed\u53e5\u5757\u5305\u542b sidebar \u662f\u4f55\u7528\u610f\u5462\uff1f\u8fd9\u662f\u90e8\u4ef6\u5316\u4fa7\u8fb9\u680f\u7684\u9700\u8981\uff0c\u5c31\u662f\u8ba9<br \/>\nsidebar \u9002\u5408 Widget \u63d2\u4ef6\uff08WP 2.0 \u540e\u5185\u7f6e\u4e86 Widget\uff0c\u6240\u4ee5\u4e0d\u7528\u518d\u5b89\u88c5\u4e86\uff09\u3002\u5982\u679c\u8981\u4f7f\u7528 Widget \u63d2\u4ef6\uff0c\u5fc5\u987b\u5bf9 sidebar \u8fdb\u884c\u90e8\u4ef6\u5316\u3002\u8fd9<br \/>\n\u6837\uff0c\u5728 WP \u540e\u53f0\u901a\u8fc7 Widget \u63d2\u4ef6\u4f60\u5c31\u53ef\u4ee5\u4f7f\u7528\u62d6\u52a8\u6765\u65b9\u4fbf\u5730\u5b9a\u4e49\u4fa7\u8fb9\u680f\u7684\u7ec4\u4ef6\u4e86\u3002\u90e8\u4ef6\u5316\u4fa7\u8fb9\u680f\uff0c\u9664\u4e86\u5728 ul \u5143\u7d20\u5185\u4fa7\u653e\u5165\u8fd9\u4e2a if \u8bed\u53e5<br \/>\n\u4e4b\u5916\uff0c\u8fd8\u5fc5\u987b\u5728 myTheme \u6587\u4ef6\u5939\u4e2d\u5efa\u7acb\u4e00\u4e2a\u6587\u4ef6 functions.php\uff0c\u5176\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<p>[code]&lt;?php<br \/>\nif ( function_exists(\u2019register_sidebar\u2019) )<br \/>\nregister_sidebar(array(<br \/>\n\u2018before_widget\u2019 =&gt; \u2018&lt;li id=\u201d%1$s\u201d class=\u201dwidget %2$s\u201d&gt;\u2019,<br \/>\n\u2018after_widget\u2019 =&gt; \u2018&lt;\/li&gt;\u2019,<br \/>\n\u2018before_title\u2019 =&gt; \u2018&lt;h2 class=\u201dsidebartitle\u201d&gt;\u2019,<br \/>\n\u2018after_title\u2019 =&gt; \u2018&lt;\/h2&gt;\u2019,<br \/>\n));<br \/>\n?&gt;[\/code]<br \/>\n(\u56db).\u6784\u4ef6footer<br \/>\nfooter \u4e2d\u4e00\u822c\u90fd\u4e00\u4e9b\u7248\u6743\u4fe1\u606f\u548c\u4e0d\u592a\u91cd\u8981\u7684\u94fe\u63a5\u3002\u6240\u4ee5\u53ef\u4ee5\u5728 &lt;div id=\u201dfooter\u201d&gt;&lt;\/div&gt; \u5143\u7d20\u4e2d\u7b80\u5355\u5730\u653e\u5165\u4e0b\u5217\u4ee3\u7801\uff1a<br \/>\n&lt;p&gt;Copyright ? 2007 &lt;?php bloginfo(\u2019name\u2019); ?&gt;&lt;\/p&gt;<br \/>\n\u81f3\u6b64\uff0c\u6838\u5fc3 index.php \u6587\u4ef6\u5c31\u7b97\u662f\u5927\u529f\u544a\u6210\u4e86\uff01<br \/>\n\u63a5\u4e0b\u6765\uff0c\u662f\u62c6\u5206 index.php \u548c\u57fa\u4e8e index.php \u6d3e\u751f\u5b50\u6a21\u677f\u6587\u4ef6\u3002<br \/>\n\u5728 myTheme \u6587\u4ef6\u5939\u4e2d\u65b0\u5efa header.php\u3001sidebar.php \u548c footer.php \u4e09\u4e2a\u6587\u4ef6\u3002\u628a index.php \u4e2d\u7684 &lt;div id=\u201dheader\u201d&gt;&lt;\/div&gt;\u3001&lt;div<br \/>\nid=\u201dsidebar\u201d&gt;&lt;\/div&gt; \u548c &lt;div id=\u201dfooter\u201d&gt;&lt;\/div&gt; \u4e09\u4e2a\u7ed3\u6784\u5316\u5143\u7d20\u53ca\u5176\u5185\u5bb9\u5206\u522b\u8f6c\u79fb\uff08\u526a\u5207\uff09\u5230\u8fd9\u4e09\u4e2a\u65b0\u6587\u4ef6\u4e2d\u3002\u7136\u540e\uff0c\u5728 &lt;div<br \/>\nid=\u201dheader\u201d&gt;&lt;\/div&gt; \u539f\u6765\u7684\u4f4d\u7f6e\u5904\u8f93\u5165\u4ee3\u7801\uff1a<br \/>\n&lt;?php get_header();?&gt;<br \/>\n\u5728 &lt;div id=\u201dsidebar\u201d&gt;&lt;\/div&gt; \u539f\u6765\u7684\u4f4d\u7f6e\u5904\u8f93\u5165\u4ee3\u7801\uff1a<br \/>\n&lt;?php get_sidebar();?&gt;<br \/>\n\u5728 &lt;div id=\u201dfooter\u201d&gt;&lt;\/div&gt; \u539f\u6765\u7684\u4f4d\u7f6e\u5904\u8f93\u5165\u4ee3\u7801\uff1a<br \/>\n&lt;?php get_footer();?&gt;<br \/>\n\u524d\u9762\u8bf4\u8fc7\uff0c\u8fd9\u4e09\u4e2a get \u51fd\u6570\u662f WP \u4e13\u95e8\u4e3a\u5305\u542b\u7ed3\u6784\u5316\u7684\u6587\u4ef6\u5b9a\u4e49\u7684\u3002\u73b0\u5728\u4f60\u7684 index.php \u6587\u4ef6\u5e94\u8be5\u5982\u4e0b\u6240\u793a\uff1a<br \/>\n[code]&lt;!DOCTYPE html PUBLIC \u201c-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\u201d \u201chttp:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd<br \/>\n\u201c&gt;<br \/>\n&lt;html xmlns=\u201dhttp:\/\/www.w3.org\/1999\/xhtml\u201c&gt;&lt;head profile=\u201dhttp:\/\/gmpg.org\/xfn\/11\u201c&gt;<br \/>\n&lt;meta http-equiv=\u201dContent-Type\u201d content=\u201d&lt;?php bloginfo(\u2019html_type\u2019); ?&gt;; charset=&lt;?php bloginfo(\u2019charset\u2019); ?&gt;\u201d \/&gt;<br \/>\n&lt;title&gt;<br \/>\n&lt;?php bloginfo(\u2019name\u2019); ?&gt;<br \/>\n&lt;?php<br \/>\nif ( is_single() ) { ?&gt; ? Blog Archive &lt;?php }<br \/>\n?&gt;<br \/>\n&lt;?php wp_title(); ?&gt;<br \/>\n&lt;\/title&gt;<br \/>\n&lt;meta name=\u201dgenerator\u201d content=\u201dWordPress &lt;?php bloginfo(\u2019version\u2019); ?&gt;\u201d \/&gt;<br \/>\n&lt;!\u2013 leave this for stats&gt;<br \/>\n&lt;link rel=\u201dstylesheet\u201d href=\u201d&lt;?php bloginfo(\u2019stylesheet_url\u2019); ?&gt;\u201d type=\u201dtext\/css\u201d media=\u201dall\u201d \/&gt;<br \/>\n&lt;link rel=\u201dstylesheet\u201d href=\u201d&lt;?php bloginfo(\u2019stylesheet_directory\u2019); ?&gt;\/print.css\u201d type=\u201dtext\/css\u201d media=\u201dprint\u201d<br \/>\n\/&gt;<br \/>\n&lt;link rel=\u201dalternate\u201d type=\u201dapplication\/rss+xml\u201d title=\u201d&lt;?php bloginfo(\u2019name\u2019); ?&gt; RSS Feed\u201d href=\u201d&lt;?php bloginfo(<br \/>\n\u2019rss2_url\u2019); ?&gt;\u201d \/&gt;<br \/>\n&lt;link rel=\u201dpingback\u201d href=\u201d&lt;?php bloginfo(\u2019pingback_url\u2019); ?&gt;\u201d \/&gt;&lt;?php wp_head(); ?&gt;<br \/>\n&lt; \/head&gt;<br \/>\n&lt; body&gt;<br \/>\n&lt; div id=\u201dpage\u201d&gt;&lt;?php get_header(); ?&gt; &lt;!\u2013 content \u2013&gt;<br \/>\n&lt;div id=\u201dcontent\u201d&gt;<br \/>\n&lt; ?php if (have_posts()) : ?&gt;<br \/>\n&lt; ?php while (have_posts()) : the_post(); ?&gt; &lt;div class=\u201dpost\u201d id=\u201dpost-&lt;?php the_ID() ?&gt;\u201d&gt;<br \/>\n&lt; !\u2013 \u535a\u6587\u6807\u9898\u53ca\u94fe\u63a5 \u2013&gt;<br \/>\n&lt;h2&gt;&lt;a href=\u201d&lt;?php the_permalink() ?&gt;\u201d rel=\u201dbookmark\u201d title=\u201d&lt;?php the_title(); ?&gt;\u201d&gt;<br \/>\n&lt; ?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/h2&gt;<br \/>\n&lt; !\u2013 \u53d1\u8868\u65e5\u671f \u2013&gt;<br \/>\n&lt;div class=\u201dpost-date\u201d&gt;<br \/>\n&lt;span class=\u201dpost-month\u201d&gt;&lt;?php the_time(\u2019M\u2019) ?&gt;&lt;\/span&gt;<br \/>\n&lt; span class=\u201dpost-day\u201d&gt;&lt;?php the_time(\u2019d\u2019) ?&gt;&lt;\/span&gt;<br \/>\n&lt; \/div&gt;<br \/>\n&lt; !\u2013 \u4f5c\u8005 \u2013&gt;<br \/>\n&lt;span class=\u201dpost-author\u201d&gt;&lt;?php _e(\u2019Author\u2019); ?&gt;\uff1a&lt;?php the_author(\u2019, \u2018) ?&gt;&lt;\/span&gt;<br \/>\n&lt; !\u2013 \u7c7b\u522b \u2013&gt;<br \/>\n&lt;span class=\u201dpost-cat\u201d&gt;&lt;?php _e(\u2019Categories\u2019); ?&gt;\uff1a&lt;?php the_category(\u2019, \u2018) ?&gt;&lt;\/span&gt;<br \/>\n&lt; !\u2013 \u6ce8\u91ca \u2013&gt;<br \/>\n&lt;span class=\u201dpost-comments\u201d&gt;<br \/>\n&lt; ?php comments_popup_link(\u2019No Comments ?\u2019, \u20181 Comment ?\u2019, \u2018% Comments ?\u2019); ?&gt;&lt;\/span&gt;<br \/>\n&lt; !\u2013 \u5185\u5bb9 \u2013&gt;<br \/>\n&lt;div class=\u201dentry\u201d&gt;<br \/>\n&lt; ?php the_content(\u2019\u66f4\u591a\u5185\u5bb9 ?\u2019); ?&gt;<br \/>\n&lt; \/div&gt;<br \/>\n&lt; !\u2013 \u5176\u4ed6\u5143\uff08Meta\uff09\u6570\u636e \u2013&gt;<br \/>\n&lt;div class=\u201dpost-meta\u201d&gt;<br \/>\n&lt; ?php edit_post_link(\u2019\u7f16\u8f91\u2019,\u2019 | \u2018,\u201d); ?&gt;<br \/>\n&lt; \/div&gt; &lt;\/div&gt;<br \/>\n&lt; ?php endwhile; ?&gt; &lt;div class=\u201dnavigation\u201d&gt;<br \/>\n&lt;span class=\u201dprevious-entries\u201d&gt;&lt;?php next_posts_link(\u2019\u524d\u4e00\u7bc7\u2019) ?&gt;&lt;\/span&gt;<br \/>\n&lt;span class=\u201dnext-entries\u201d&gt;&lt;?php previous_posts_link(\u2019\u540e\u4e00\u7bc7\u2019) ?&gt;&lt;\/span&gt;<br \/>\n&lt; \/div&gt;<br \/>\n&lt; ?php else : ?&gt;<br \/>\n&lt; div class=\u201dpost\u201d&gt;<br \/>\n&lt;h2&gt;&lt;?php _e(\u2019Not Found\u2019); ?&gt;&lt;\/h2&gt;<br \/>\n&lt; \/div&gt;&lt;?php endif; ?&gt;<br \/>\n&lt; \/div&gt;&lt;!\u2013 end content \u2013&gt;&lt;?php get_sidebar(); ?&gt; &lt;?php get_footer(); ?&gt;&lt;\/div&gt;<br \/>\n&lt; \/body&gt;<br \/>\n&lt; \/html&gt;[\/code]<br \/>\n\u4ee5\u4e0a\u57fa\u672c\u5c31\u662fwordpress\u7a0b\u5e8f\u7684DIV\u7ed3\u6784\u4e86\u3002\u7136\u540e\u662f\u8bde\u751f\u5b50\u6a21\u677f\u6587\u4ef6\u3002\u628a\u8fd9\u4e2a\u201c\u6a21\u5757\u5316\u201d\u7684 index.php \u6587\u4ef6\u53e6\u5b58\u4e3a single.php\u3001page.php\u3001<br \/>\narchive.php\u3001 search.php \u548c category.php\u3002\u5f53\u7136\uff0c\u90fd\u4fdd\u5b58\u5728 myTheme \u6587\u4ef6\u5939\u4e2d\u3002\u8fd9\u6837\uff0cWP \u5728\u663e\u793a\u9875\u9762\u65f6\u5c31\u4f1a\u8c03\u7528\u76f8\u5e94\u7684\u9875\u9762\u6587\u4ef6\u4e86\u3002<br \/>\n\u6bd4\u5982\uff0c\u663e\u793a\u535a\u6587\u8be6\u7ec6\u5185\u5bb9\u65f6\uff0c\u4f1a\u8c03\u7528 single.php\uff1b\u800c\u663e\u793a\u9875\u9762\u5185\u5bb9\u65f6\uff0c\u5219\u8c03\u7528 page.php\u3002 \u6700\u540e\uff0c\u8981\u505a\u7684\u5de5\u4f5c\u5c31\u662f\u81ea\u5b9a\u4e49\u8fd9\u4e9b\u5b50\u6a21\u677f\u6587\u4ef6\u3002<\/p>\n<p>&nbsp;<\/p>\n<div>\u6587\u7ae0\u6765\u6e90\uff1awordpress\u5efa\u7ad9\u6559\u7a0b|wordpress\u4e3b\u9898\u5236\u4f5c|wordpress\u6a21\u677f|wordpress\u4e0b\u8f7d<br \/>\n(<a href=\"https:\/\/sdeno.com\">www.xgllseo.com<\/a>)\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff0c\u8bf7\u5c0a\u91cd\u7248\u6743\u3002<\/div>\n","protected":false},"excerpt":{"rendered":"<p>WordPress\u57fa\u672c\u6a21\u677f\u6587 \u4e00\u822c\u9ed8\u8ba4\u4e3b\u9898\u6587\u4ef6\u662f\u8fd9\u4e2a\u76ee\u5f55\u4e0b\\wp-content\\themes\\\u4f60\u7684\u4e3b\u9898\u6587\u4ef6\u540d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"close","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,11],"tags":[],"class_list":["post-958","post","type-post","status-publish","format-standard","hentry","category-wordpress","category-11"],"_links":{"self":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=958"}],"version-history":[{"count":0,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/958\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}