{"id":32890,"date":"2024-11-25T16:34:02","date_gmt":"2024-11-25T08:34:02","guid":{"rendered":"https:\/\/fwq.ai\/blog\/32890\/"},"modified":"2024-11-25T16:34:02","modified_gmt":"2024-11-25T08:34:02","slug":"%e5%b0%86%e6%82%a8%e7%9a%84-wordpress-%e4%b8%bb%e9%a2%98%e8%bd%ac%e6%8d%a2%e4%b8%ba-html5","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/32890\/","title":{"rendered":"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5"},"content":{"rendered":"<\/p>\n<p>html5 \u5f15\u5165\u4e86\u4e00\u7cfb\u5217\u51fa\u8272\u7684\u65b0\u529f\u80fd\u548c\u7b80\u5355\u7684\u9009\u9879\u3002\u5f88\u5feb\u5b83\u5c06\u5f97\u5230\u5f53\u4eca\u4f7f\u7528\u7684\u5927\u591a\u6570\u6d4f\u89c8\u5668\u7684\u5168\u9762\u652f\u6301\u3002\u6700\u7ec8\u6bcf\u4e2a\u4eba\u90fd\u5fc5\u987b\u5c06 wordpress \u4e3b\u9898\u4ece xhtml \u8f6c\u6362\u4e3a html5\u3002\u5728 google \u7684\u718a\u732b\u66f4\u65b0\u4e4b\u540e\uff0c\u60a8\u7684\u7f51\u7ad9\u9700\u8981\u66f4\u6e05\u6670\u3001\u66f4\u6613\u4e8e\u9605\u8bfb\u7684\u4ee3\u7801\u624d\u80fd\u5728 google \u4e0a\u83b7\u5f97\u66f4\u597d\u7684\u6392\u540d\u3002\u6211\u5c06\u6559\u60a8\u5982\u4f55\u5c06\u4e3b\u9898\u4ece xhtml \u8f6c\u6362\u4e3a html5\u3002\u6211\u4eec\u8fd8\u5c06\u7167\u987e\u7981\u7528 javascript \u7684 2% \u7684\u4e92\u8054\u7f51\u7528\u6237\uff08\u4e3a\u4e86\u5411\u540e\u517c\u5bb9\uff09\u3002 <\/p>\n<hr>\n<h2>\u6211\u4eec\u7684\u76ee\u6807<\/h2>\n<p>\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u96c6\u4e2d\u7cbe\u529b\u5c06 WordPress \u4e3b\u9898\u4ece XHTML \u8f6c\u6362\u4e3a HTML5\u3002\u6211\u4eec\u5c06\u9010\u6b65\u901a\u8fc7\u4e0b\u9762\u5217\u51fa\u7684\u6587\u4ef6\u4e86\u89e3\u66f4\u6539\uff08\u8fd9\u4e9b\u6587\u4ef6\u4f4d\u4e8e\u60a8\u7684\u4e3b\u9898\u6587\u4ef6\u5939\u4e2d\uff0c\u5373<em>wp-content\/themes\/yourtheme\/here\uff01<\/em>\uff09<\/p>\n<ul>\n<li><strong>header.php<\/strong><\/li>\n<li><strong>index.php<\/strong><\/li>\n<li><strong>sidebar.php\uff1a<\/strong><\/li>\n<li><strong>footer.php<\/strong><\/li>\n<li> <strong>single.php<\/strong>\uff08\u53ef\u9009\uff09<\/li>\n<\/ul>\n<hr>\n<h2>\u57fa\u672c HTML5 \u5e03\u5c40<\/h2>\n<p>\u8ba9\u6211\u4eec\u770b\u4e00\u4e0b\u6211\u4eec\u5c06\u8981\u6784\u5efa\u7684\u57fa\u672c HTML5 \u5e03\u5c40\u3002 HTML5 \u4e0d\u4ec5\u4ec5\u662f\u4ee3\u7801\u5f00\u5934\u7684\u6587\u6863\u7c7b\u578b\u3002\u51e0\u4e2a\u65b0\u5f15\u5165\u7684\u5143\u7d20\u5e2e\u52a9\u6211\u4eec\u4ee5\u66f4\u5c11\u7684\u6807\u8bb0\u4ee5\u6709\u6548\u7684\u65b9\u5f0f\u8bbe\u8ba1\u6837\u5f0f\u548c\u7f16\u7801\uff08\u8fd9\u5c31\u662f HTML5 \u66f4\u597d\u7684\u539f\u56e0\u4e4b\u4e00\uff09\u3002<\/p>\n<pre>\n\n\n\n\t&lt;title&gt;TITLE | Slogan!&lt;\/title&gt;&lt;nav role=\"navigation\"&gt;&lt;\/nav&gt;&lt;!--Ending header.php--&gt;&lt;!--Begin  index.php--&gt;&lt;section id=\"content\"&gt;&lt;article role=\"main\"&gt;&lt;h1&gt;Title of the Article&lt;\/h1&gt;\n\t\t\t&lt;time datetime=\"YYYY-MM-DD\"&gt;&lt;\/time&gt;&lt;p&gt;Some lorem ispum text of your post goes here.&lt;\/p&gt;\n\t\t\t&lt;p&gt;The article's text ends.&lt;\/p&gt;\n&lt;p&gt;&lt;span&gt;\u7acb\u5373\u5b66\u4e60&lt;\/span&gt;\u201c&lt;a href=\"https:\/\/pan.quark.cn\/s\/cb6835dc7db1\" style=\"text-decoration: underline !important; color: blue; font-weight: bolder;\" rel=\"nofollow\" target=\"_blank\"&gt;\u524d\u7aef\u514d\u8d39\u5b66\u4e60\u7b14\u8bb0\uff08\u6df1\u5165\uff09&lt;\/a&gt;\u201d\uff1b&lt;\/p&gt;\n\t\t&lt;\/article&gt;&lt;aside role=\"sidebar\"&gt;&lt;h2&gt;Some Widget in The Sidebar&lt;\/h2&gt;\n\t\t&lt;\/aside&gt;&lt;\/section&gt;&lt;!--Ending index.php--&gt;&lt;!--begin  footer.php--&gt;&lt;footer role=\"foottext\"&gt;&lt;small&gt;Some Copyright info&lt;\/small&gt;\n\t&lt;\/footer&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u73b0\u5728\u6211\u4eec\u53ea\u9700\u8981\u77e5\u9053 header\u3001footer\u3001nav\u3001section \u548c article \u7684\u65b0 HTML5 \u6807\u7b7e\u653e\u5728\u54ea\u91cc\u5373\u53ef\u3002\u4e0e div \u7ed3\u6784\u5316 XHTML \u76f8\u6bd4\uff0c\u65b0\u5f15\u5165\u7684\u6807\u7b7e\u7684\u540d\u79f0\u662f\u4e0d\u8a00\u81ea\u660e\u7684\u3002<\/p>\n<hr>\n<h2> <span>\u6b65\u9aa4 1<\/span> \u5c06 header.php \u8f6c\u6362\u4e3a HTML5<\/h2>\n<p>\u73b0\u5728\u6211\u5c06\u5411\u60a8\u5c55\u793aXHTML WordPress\u4e3b\u9898\u7684header.php\u4e2d\u5e38\u7528\u7684\u4ee3\u7801\u3002<\/p>\n<h3>XHTML \u4e3b\u9898 header.php<\/h3>\n<pre>\n\n\n\n&lt;title&gt;My  Blog&lt;\/title&gt;&lt;?php wp_head(); ?&gt;&lt;!-- Header  --&gt;&lt;div class=\"header\"&gt;\n\t&lt;div class=\"container\"&gt;\n\t\t&lt;h1&gt;&lt;a href=\"&amp;lt;?php%20bloginfo('url');?&amp;gt;\"&gt;My Blog is Working Great.&lt;\/a&gt;&lt;\/h1&gt;\n\t&lt;\/div&gt;\n&lt;!-- End  Container --&gt;\n&lt;\/div&gt;&lt;!-- End  Header --&gt;\n\n\n&lt;!-- Navigation Bar Starts --&gt;\n&lt;div class=\"navbar\"&gt;\n\t&lt;div class=\"container\"&gt;\n\t\t&lt;ul class=\"grid nav_bar\"&gt;&lt;?php wp_list_categories('navs_li='); ?&gt;&lt;\/ul&gt;\n&lt;\/div&gt;\n&lt;\/div&gt;\n&lt;!-- Navigation Bar Ends --&gt;\n&lt;div class=\"container\"&gt;\n\n&lt;p&gt;\u6709\u4eba\u5fc5\u987b\u95ee\u6211\u4eec\u4e3a\u4ec0\u4e48\u8981\u505a\u8fd9\u4e00\u5207\uff1f\u7b54\u6848\u5f88\u7b80\u5355\uff0c\u5c31\u662f HTML5 \u7684\u8bed\u4e49\u6807\u8bb0\u3002\u5b83\u51cf\u5c11\u4e86\u6807\u8bb0\uff0c\u4f7f\u5176\u975e\u5e38\u6613\u4e8e\u7406\u89e3\u548c\u7ba1\u7406\u3002&lt;\/p&gt;\n&lt;h3&gt;HTML5 header.php\uff08\u8f6c\u6362\uff09&lt;\/h3&gt;\n&lt;p&gt;\u9605\u8bfb\u4ee3\u7801\uff0c\u7136\u540e\u6309\u7167\u4ee5\u4e0b\u8bf4\u660e\u5c06\u4e3b\u9898\u7684 header.php \u8f6c\u6362\u4e3a HTML5\u3002&lt;\/p&gt;\n&lt;pre class=\"brush:html;toolbal:false;\"&gt;\n\n\n\n&lt;title&gt;My Blog&lt;\/title&gt;&lt;?php wp_head(); ?&gt;&lt;!-- Header --&gt;&lt;header&gt;&lt;div class=\"container\"&gt;\n        &lt;h1 class=\"grid\"&gt;&lt;a href=\"&amp;lt;?php%20bloginfo('url');?&amp;gt;\"&gt;My Blog is Working Great.&lt;\/a&gt;&lt;\/h1&gt;\n    &lt;\/div&gt;\n&lt;\/header&gt;&lt;!-- End Header  --&gt;&lt;!-- Navigation Bar Starts--&gt;&lt;nav&gt;&lt;div class=\"navbar\"&gt;\n        &lt;ul class=\"grid nav_bar\"&gt;&lt;?php wp_list_categories('title_li='); ?&gt;&lt;\/ul&gt;\n&lt;\/div&gt;\n&lt;\/nav&gt;&lt;!-- Navigation Bar Ends --&gt;&lt;section class=\"container\"&gt;&lt;\/section&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6b63\u5982\u60a8\u6240\u770b\u5230\u7684\uff0c\u8f6c\u6362\u540e\u7684\u4ee3\u7801\u4e0e XHTML \u4ee3\u7801\u975e\u5e38\u76f8\u4f3c\u3002\u8ba9\u6211\u4eec\u8ba8\u8bba\u4e00\u4e0b\u8fd9\u4e9b\u53d8\u5316\u3002<\/p>\n<ul>\n<li> \u2013 HTML5 \u6709\u4e00\u4e2a\u975e\u5e38\u7b80\u5355\u7684 doctype\uff0c\u4f46\u5b83\u5305\u542b\u8bb8\u591a\u65b0\u7684\u8bed\u4e49\u6807\u7b7e<\/li>\n<li>  \u2013 \u6807\u5934\u90e8\u5206\u7684\u8bed\u4e49\u6807\u8bb0  <\/li>\n<li>  \u2013 \u6211\u4eec\u7528\u4e00\u4e2a\u65b0\u7684\u8bed\u4e49\u6807\u7b7e\u66ff\u6362\u4e86\u5bfc\u822a\u680f\u7684 div \u4ee3\u7801\uff0c\u7528\u4e8e\u63a7\u5236 HTML5 \u4e2d\u7684\u5bfc\u822a\u680f\u3002  <\/li>\n<\/ul>\n<p><strong>\u6ce8\u610f\uff1a<\/strong> <em>\u6709\u4e9b\u4eba\u5728\u6807\u5934\u4e2d\u5305\u542b section \u6807\u8bb0\u3002\u5173\u4e8e\u8fd9\u4e00\u70b9\u6709\u5f88\u591a\u4e89\u8bba\u3002\u6211\u4e2a\u4eba\u53cd\u5bf9\u5728\u6807\u5934\u4e2d\u5305\u542b section \u6807\u7b7e\uff0c\u56e0\u4e3a\u5b83\u4f1a\u7834\u574f HTML5 \u7684\u7f8e\u611f\u3002\u5f53\u7136\uff0c\u60a8\u53ef\u4ee5\u5728\u90a3\u91cc\u4f7f\u7528\u65e7\u7684 div \u3002<\/em><\/p>\n<h3>\u811a\u672c\u548c\u6837\u5f0f\u8868\u600e\u4e48\u6837\uff1f<\/h3>\n<p>\u5c06 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5 \u65f6\uff0c\u6807\u5934\u4e2d\u5305\u542b\u7684\u811a\u672c\u548c\u6837\u5f0f\u8868\u786e\u5b9e\u975e\u5e38\u7b80\u5355\u3002\u5728 HTML5 \u4e2d\uff0c\u6211\u4eec\u53ea\u4f7f\u7528 &lt;script&gt; \u548c &lt;link&gt; \u6807\u7b7e\u3002\u56e0\u6b64\uff0c\u5220\u9664 type=&#8221;text\/javascript&#8221; &#8211; \u6240\u6709\u6d4f\u89c8\u5668\u90fd\u4f1a\u5c06 &lt;script&gt; \u6807\u8bb0\u89c6\u4e3a JavaScript\uff0c\u9664\u975e\u60a8\u660e\u786e\u5199\u5165\u5176\u7c7b\u578b\u3002\u540c\u6837\uff0c\u4ece\u6837\u5f0f\u8868\u7684 &lt;link&gt; \u6807\u8bb0\u4e2d\u5220\u9664 type=&#8221;text\/css&#8221;\u3002&lt;\/script&gt;<\/p>\n<h3>\u8003\u8651\u65e7\u6d4f\u89c8\u5668\uff01<\/h3>\n<p>\u5305\u542b HTML shiv \u4ee5\u652f\u6301\u65e7\u7248\u6d4f\u89c8\u5668\u3002\u8fd9\u662f\u4e00\u4e2a\u7b80\u5355\u7684 JavaScript \u6587\u4ef6\u3002 shiv \u7684\u4e00\u4e9b\u793a\u4f8b\u662f Remy Sharp \u7684 HTML5 \u811a\u672c\u6216 Modernizr \u811a\u672c\u3002\u8ba9\u6211\u4eec\u4f7f\u7528 Modernizr\u3002<\/p>\n<p>\u6211\u4eec\u9700\u8981\u5c06\u811a\u672c\u4ece\u6211\u4eec\u7684functions.php \u6587\u4ef6\u4e2d\u6392\u5165\u961f\u5217\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre>\nfunction html5_scripts()\n{\n\t\/\/ Register the Modernizr script\n\twp_register_script( 'modernizr', get_template_directory_uri() . '\/js\/Modernizr-1.6.min.js' );\n\n\t\/\/ Enqueue Modernizr\n\twp_enqueue_script( 'modernizr' );\n}\nadd_action( 'wp_enqueue_scripts', 'html5_scripts', 1 );\n<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p><strong>\u63d0\u793a\uff1a<\/strong> <em>\u5c06\u8fde\u7eed\u51fa\u73b0\u7684\u6807\u9898\u6807\u7b7e\u653e\u5165 <\/em><\/p>\n<\/p>\n<p><strong>\u6ce8\u610f\uff1a<\/strong> <em>\u6b64\u811a\u672c\u9700\u8981\u653e\u7f6e\u5728  \u6807\u7b7e\uff0c\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48\u6211\u4eec\u7ed9 add_action \u4f18\u5148\u7ea7\u4e3a 1\u3002<\/em><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/887\/227\/169396399185053.jpg\" class=\"aligncenter\" title=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe\" alt=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.php.cn\/uploads\/20230829\/169328620964ed7f414f04e.jpg\" style=\"max-width:90%\" class=\"aligncenter\" title=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe1\" alt=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe1\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/887\/227\/169396399125684.jpg\" class=\"aligncenter\" title=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe2\" alt=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe2\" \/> <\/p>\n<hr>\n<h2> <span>\u7b2c2\u6b65<\/span>\u5c06index.php\u8f6c\u6362\u4e3aHTML5<\/h2>\n<p>\u5e38\u89c1\u7684 XHTML index.php \u7531\u4ee5\u4e0b\u6807\u7b7e\u7ec4\u6210\u3002\u6211\u5c06\u9010\u4e00\u8fdb\u884c\u8f6c\u6362\uff0c\u89e3\u91ca\u8f6c\u6362\u540e\u7684\u6574\u4e2a\u8fc7\u7a0b\u3002<\/p>\n<p><strong>\u6ce8\u610f\uff1a<\/strong> <em>\u6211\u4e0d\u4f1a\u5728\u6b64\u5904\u6dfb\u52a0\u6574\u4e2a\u4ee3\u7801\uff0c\u56e0\u4e3a\u5b83\u4f1a\u65e0\u7f18\u65e0\u6545\u5730\u4f7f\u5e16\u5b50\u53d8\u5f97\u66f4\u957f\u3002<\/em><\/p>\n<h3>XHTML\u7d22\u5f15.php<\/h3>\n<pre>\n&lt;div id=\"container\"&gt;\n&lt;div id=\"content\"&gt;\n&lt;div id=\"entries\"&gt;\n&lt;div id=\"post\"&gt;...&lt;\/div&gt;\n\n&lt;\/div&gt;\n&lt;!--Ending Entries--&gt;\n&lt;?php get_sidebar(); ?&gt;\n&lt;\/div&gt;\n&lt;!--Ending content--&gt;\n&lt;\/div&gt;&lt;!--Ending container--&gt;\n&lt;?php get_footer(); ?&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236<br \/>\n<img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/887\/227\/169396399125069.jpg\" class=\"aligncenter\" title=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe3\" alt=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe3\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.php.cn\/uploads\/20230829\/169328622064ed7f4cc3d2e.jpg\" style=\"max-width:90%\" class=\"aligncenter\" title=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe4\" alt=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe4\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/887\/227\/169396399115001.jpg\" class=\"aligncenter\" title=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe5\" alt=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe5\" \/> <\/p>\n<h3>HTML5 index.php\uff08\u8f6c\u6362\uff09<\/h3>\n<pre>\n&lt;div id=\"container\"&gt;\n\t&lt;div id=\"content\"&gt;\n\t\t&lt;section id=\"entries\"&gt;&lt;article id=\"post\"&gt;...&lt;\/article&gt;&lt;\/section&gt;&lt;!--end entries--&gt;&lt;?php get_sidebar(); ?&gt;\n&lt;\/div&gt;\n&lt;!--end content--&gt;\n&lt;\/div&gt;&lt;!--end wrap--&gt;\n&lt;?php get_footer(); ?&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5728\u770b\u6211\u4eec\u6240\u505a\u7684\u66f4\u6539\u4e4b\u524d\uff0c\u6211\u4eec\u5fc5\u987b\u77e5\u9053HTML5\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u4e09\u4e2a\u57fa\u672c\u7684\u5e03\u5c40\u5efa\u6a21\u6807\u7b7e\uff1aSection\u3001article\u548caside\u3002 Section \u5c06\u66ff\u6362\u6761\u76ee\u7684 div\uff0carticle \u5c06\u66ff\u6362\u5e16\u5b50\u7684 div\uff0c\u7a0d\u540e aside \u5c06\u7528\u4e8e\u6211\u4eec\u7684\u4fa7\u8fb9\u680f\u3002<\/p>\n<ul>\n<li>  \u2013 HTML5 \u6709\u4e00\u4e2a\u540d\u4e3a section \u7684\u5e03\u5c40\u6807\u7b7e\uff0c\u7528\u4e8e\u5206\u9694\u5176\u4e2d\u4f7f\u7528\u7684\u4ee3\u7801\u5757  <\/li>\n<li>  \u2013 \u5e16\u5b50\u90e8\u5206\u7684\u8bed\u4e49\u6807\u7b7e\uff0c\u7c7b\u4f3c\u4e8e section  <\/li>\n<li>  \u2013 \u5e16\u5b50\u56fe\u50cf\u7684\u8bed\u4e49\u6807\u8bb0\uff0c\u7528\u4e8e\u5c06\u5176\u653e\u5728\u4e00\u8fb9\u548c\u4fa7\u8fb9\u680f  <\/li>\n<li> \u9762\u5305\u5c51\u548c\u9875\u9762\u5bfc\u822a \u2013 \u5982\u679c\u6211\u4eec\u7684\u4e3b\u9898\u6709\u9762\u5305\u5c51\uff0c\u90a3\u4e48\u5b83\u4eec\u5c06\u5728 div \u4e2d\u4f7f\u7528\uff0c\u4f8b\u5982  &#8230;  \uff0c\u5bf9\u4e8e\u9875\u9762\u5bfc\u822a\uff0c\u6211\u4eec\u5c06\u4f7f\u7528  <\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/887\/227\/169396399110772.jpg\" class=\"aligncenter\" title=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe6\" alt=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe6\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.php.cn\/uploads\/20230829\/169328623264ed7f582230b.jpg\" style=\"max-width:90%\" class=\"aligncenter\" title=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe7\" alt=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe7\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/887\/227\/169396399246057.jpg\" class=\"aligncenter\" title=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe8\" alt=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe8\" \/> <\/p>\n<h3>HTML5 \u4e2d\u7684\u5b8c\u6574 Index.php<\/h3>\n<p><strong>\u6ce8\u610f\uff1a<\/strong> <em>\u6211\u7c98\u8d34\u4e86\u4e00\u4e2a\u901a\u7528\u7684index.php\uff0c\u5982\u4e0b\u6240\u793a\uff0c\u4e0b\u9762\u662f\u4e00\u4e9b\u8f6c\u6362\u4e3a HTML5 \u7684\u5b8c\u6574\u4ee3\u7801\u3002<\/em><\/p>\n<pre>\n&lt;section class=\"entries\"&gt;&lt;?php if (have_posts()) : while (have_posts()) : the_post();\n  \n&lt;article class=\"post\" id=\"post-&lt;?php the_ID(); ?&gt;\"&amp;gt;\n    &lt;aside class=\"post_image\"&gt;&lt;?php if ( has_post_thumbnail() ) { \n            the_post_thumbnail();\n        } else { ?&gt;&lt;a href=\"&amp;lt;?php%20the_permalink()%20?&amp;gt;\"&gt;&lt;img  src=\"&amp;lt;?php%20bloginfo('template_directory');?&amp;gt;\/images\/noImage.gif\" title=\"&amp;lt;?php the_title(); ?&amp;gt;\" alt=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\" &gt;&lt;\/a&gt;\n        &lt;?php }?&gt;&lt;\/aside&gt;&lt;section class=\"post_content\"&gt;&lt;h1&gt;&lt;a href=\"&amp;lt;?php%20the_permalink()%20?&amp;gt;\" rel=\"bookmark\" title=\"&amp;lt;?php the_title(); ?&amp;gt;\"&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/h1&gt;\n        &lt;p&gt;&lt;?php echo get_the_excerpt(); ?&gt;&lt;\/p&gt;\n        &lt;a href=\"&amp;lt;?php%20the_permalink()%20?&amp;gt;\" rel=\"bookmark\" title=\"&amp;lt;?php the_title(); ?&amp;gt;\" class=\"read_more \"&gt;Read More&lt;\/a&gt;\n    &lt;\/section&gt;&lt;section class=\"meta\"&gt;&lt;p&gt; &lt;?php the_category(',') ?&gt;&lt;\/p&gt;\n \n    &lt;p&gt;&lt;?php the_tags(\"\"); ?&gt;&lt;\/p&gt;\n \n    &lt;\/section&gt;&lt;?php endwhile; else: ?&gt;&lt;p&gt;\n    &lt;?php _e('Sorry, no posts matched your criteria.'); ?&gt;&lt;\/p&gt;\n  &lt;?php endif; ?&gt;&lt;?php posts_nav_link(' \u23fc ', __('\u00ab Newer Posts'), __('Older Posts \u00bb')); ?&gt;&lt;\/section&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<hr>\n<h2> <span>\u7b2c 3 \u6b65<\/span> \u5904\u7406 sidebar.php<\/h2>\n<p>\u6211\u4eec\u5c06\u5728\u4fa7\u8fb9\u680f\u4e2d\u4f7f\u7528 <\/p>\n<p>  \u800c\u4e0d\u662f div\uff0c\u4f8b\u5982\uff1a  <\/p>\n<h3>XHTML \u4e2d\u7684 sidebar.php<\/h3>\n<pre>\n&lt;div id=\"sidebar\"&gt;...&lt;\/div&gt;\n<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4f7f\u7528<\/p>\n<p>  \u540e\u53d8\u6210\u5982\u4e0b\u3002  <\/p>\n<h3>HTML5 \u4e2d\u7684 sidebar.php<\/h3>\n<pre>\n&lt;aside id=\"sidebar\"&gt;...&lt;\/aside&gt;&lt;p&gt;\u8fd9\u5f88\u7b80\u5355\uff01&lt;\/p&gt;\n\n&lt;img src=\"https:\/\/img.php.cn\/upload\/article\/000\/887\/227\/169396399231136.jpg\" alt=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\"&gt;&lt;img  src=\"\/uploads\/20230829\/169328624364ed7f63ef405.jpg\" border=\"0\" loading=\"lazy\"    style=\"max-width:90%\" height=\"195px\" class=\"resized-image resized-image-tablet\" srcset=\"https:\/\/cdn.tutsplus.com\/cdn-cgi\/image\/width=1200\/wp\/uploads\/legacy\/200_Convert_Your_WordPress_Theme_to_HTML5\/side.jpg 2x\" alt=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\" &gt;&lt;img src=\"https:\/\/img.php.cn\/upload\/article\/000\/887\/227\/169396399298279.jpg\" alt=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\"&gt;&lt;hr&gt;&lt;h2&gt;\n&lt;span&gt;\u7b2c 4 \u6b65&lt;\/span&gt; footer.php \u7f16\u8f91&lt;\/h2&gt;\n&lt;p&gt;\u6211\u4eec\u5c06\u5728 footer.php \u4e2d\u4f7f\u7528 &lt;footer&gt; \u8bed\u4e49\u6807\u7b7e\u800c\u4e0d\u662f\u7b80\u5355\u7684 div\uff0c\u4f8b\u5982\uff1a&lt;\/footer&gt;&lt;\/p&gt;\n&lt;h3&gt;XHTML \u4e2d\u7684 footer.php&lt;\/h3&gt;\n&lt;pre class=\"brush:php;toolbal:false;\"&gt;\n&lt;div id=\"footer\"&gt;\n&lt;div id=\"foot_widgets\"&gt;...&lt;\/div&gt;\n&lt;div id=\"copyright\"&gt;...&lt;\/div&gt;\n&lt;\/div&gt;\n&lt;?php wp_footer(); ?&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236<br \/>\n<img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/887\/227\/169396399260646.jpg\" class=\"aligncenter\" title=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe9\" alt=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe9\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.php.cn\/uploads\/20230829\/169328625864ed7f726b16f.jpg\" style=\"max-width:90%\" class=\"aligncenter\" title=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe10\" alt=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe10\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/887\/227\/169396399278648.jpg\" class=\"aligncenter\" title=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe11\" alt=\"\u5c06\u60a8\u7684 WordPress \u4e3b\u9898\u8f6c\u6362\u4e3a HTML5\u63d2\u56fe11\" \/> <\/p>\n<h3>HTML5 \u4e2d\u7684 footer.php<\/h3>\n<pre>\n&lt;footer id=\"footer\"&gt;&lt;section id=\"foot_widgets\"&gt;...&lt;\/section&gt;&lt;section id=\"foot_widgets\"&gt;...&lt;\/section&gt;&lt;section id=\"foot_widgets\"&gt;...&lt;\/section&gt;&lt;div id=\"copyright\"&gt;...&lt;\/div&gt;\n&lt;\/footer&gt;&lt;?php wp_footer(); ?&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<hr>\n<h2> <span>\u7b2c 5 \u6b65<\/span>\u5904\u7406 single.php<\/h2>\n<p>single.php \u6ca1\u6709\u4ec0\u4e48\u7279\u522b\u7684\u53d8\u5316\uff0c\u6240\u4ee5\u6211\u53ea\u662f\u7c98\u8d34\u66f4\u6539\u540e\u7684\u4ee3\u7801\uff0c\u8fd9\u53ef\u80fd\u5bf9\u4e00\u4e9b\u521d\u5b66\u8005\u6709\u5e2e\u52a9\u3002\u6211\u5728\u5176\u4e2d\u4f7f\u7528\u4e86 section \u548c article \u6807\u7b7e\u3002\u5982\u679c\u60a8\u613f\u610f\uff0c\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528  \u6807\u7b7e\u3002<\/p>\n<h3>XHTML \u4e2d\u7684 single.php<\/h3>\n<pre>\n&lt;?php get_header(); ?&gt;&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;&lt;div class=\"container\"&gt;\n&lt;div class=\"breadcrumbs\"&gt;&lt;?php the_breadcrumb(''); ?&gt;&lt;\/div&gt;\n    &lt;div class=\"content\"&gt;\n        &lt;h1&gt;&lt;a href=\"&amp;lt;?php%20the_permalink()%20?&amp;gt;\" rel=\"bookmark\" title=\"&amp;lt;?php the_title(); ?&amp;gt;\"&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/h1&gt;\n \n        &lt;div id=\"entry-content-single\"&gt;\n          &lt;?php the_content('&lt;p &gt;Read More'); ?&amp;gt;\n        &lt;\/div&gt;\n        &lt;div class=\"meta\"&gt; Posted by:\n          &lt;?php the_author() ?&gt;&lt;?php edit_post_link(__('Edit This')); ?&gt;&lt;p&gt;&lt;?php the_tags(\"\"); ?&gt;&lt;\/p&gt;\n        &lt;\/div&gt;\n        &lt;div class=\"clearfix\"&gt;&lt;\/div&gt;\n    &lt;\/div&gt;\n \n  &lt;!-- End of post --&gt;\n&lt;\/div&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236<\/p>\n","protected":false},"excerpt":{"rendered":"<p>html5 \u5f15\u5165\u4e86\u4e00\u7cfb\u5217\u51fa\u8272\u7684\u65b0\u529f\u80fd\u548c\u7b80\u5355\u7684\u9009\u9879\u3002\u5f88\u5feb\u5b83\u5c06\u5f97\u5230\u5f53\u4eca\u4f7f\u7528\u7684\u5927\u591a\u6570\u6d4f\u89c8\u5668\u7684\u5168\u9762\u652f\u6301\u3002\u6700\u7ec8\u6bcf\u4e2a\u4eba\u90fd\u5fc5\u987b\u5c06 wordpress \u4e3b\u9898\u4ece xhtml \u8f6c\u6362\u4e3a html5\u3002\u5728 google \u7684\u718a\u732b\u66f4\u65b0\u4e4b\u540e\uff0c\u60a8\u7684\u7f51\u7ad9\u9700\u8981\u66f4\u6e05\u6670\u3001\u66f4\u6613\u4e8e\u9605\u8bfb\u7684\u4ee3\u7801\u624d\u80fd\u5728 google \u4e0a\u83b7\u5f97\u66f4\u597d\u7684\u6392\u540d\u3002\u6211\u5c06\u6559\u60a8\u5982\u4f55\u5c06\u4e3b\u9898\u4ece xhtml \u8f6c\u6362\u4e3a html5\u3002\u6211\u4eec\u8fd8\u5c06\u7167\u987e\u7981\u7528 javascript \u7684 2% \u7684\u4e92\u8054\u7f51\u7528\u6237\uff08\u4e3a\u4e86\u5411\u540e\u517c\u5bb9\uff09\u3002 \u6211\u4eec\u7684\u76ee\u6807 \u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u96c6\u4e2d\u7cbe\u529b\u5c06 WordPress \u4e3b\u9898\u4ece XHTML \u8f6c\u6362\u4e3a HTML5\u3002\u6211\u4eec\u5c06\u9010\u6b65\u901a\u8fc7\u4e0b\u9762\u5217\u51fa\u7684\u6587\u4ef6\u4e86\u89e3\u66f4\u6539\uff08\u8fd9\u4e9b\u6587\u4ef6\u4f4d\u4e8e\u60a8\u7684\u4e3b\u9898\u6587\u4ef6\u5939\u4e2d\uff0c\u5373wp-content\/themes\/yourtheme\/here\uff01\uff09 header.php index.php sidebar.php\uff1a footer.php single.php\uff08\u53ef\u9009\uff09 \u57fa\u672c HTML5 \u5e03\u5c40 \u8ba9\u6211\u4eec\u770b\u4e00\u4e0b\u6211\u4eec\u5c06\u8981\u6784\u5efa\u7684\u57fa\u672c HTML5 \u5e03\u5c40\u3002 HTML5 \u4e0d\u4ec5\u4ec5\u662f\u4ee3\u7801\u5f00\u5934\u7684\u6587\u6863\u7c7b\u578b\u3002\u51e0\u4e2a\u65b0\u5f15\u5165\u7684\u5143\u7d20\u5e2e\u52a9\u6211\u4eec\u4ee5\u66f4\u5c11\u7684\u6807\u8bb0\u4ee5\u6709\u6548\u7684\u65b9\u5f0f\u8bbe\u8ba1\u6837\u5f0f\u548c\u7f16\u7801\uff08\u8fd9\u5c31\u662f HTML5 \u66f4\u597d\u7684\u539f\u56e0\u4e4b\u4e00\uff09\u3002 &lt;title&gt;TITLE | Slogan!&lt;\/title&gt;&lt;nav role=&#8221;navigation&#8221;&gt;&lt;\/nav&gt;&lt;!&#8211;Ending header.php&#8211;&gt;&lt;!&#8211;Begin index.php&#8211;&gt;&lt;section id=&#8221;content&#8221;&gt;&lt;article role=&#8221;main&#8221;&gt;&lt;h1&gt;Title of the Article&lt;\/h1&gt; &lt;time datetime=&#8221;YYYY-MM-DD&#8221;&gt;&lt;\/time&gt;&lt;p&gt;Some lorem ispum [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-32890","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/32890","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=32890"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/32890\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=32890"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=32890"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=32890"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}