{"id":4616,"date":"2019-01-13T23:30:18","date_gmt":"2019-01-13T15:30:18","guid":{"rendered":"https:\/\/www.npc.ink\/4616.html"},"modified":"2019-01-13T23:31:50","modified_gmt":"2019-01-13T15:31:50","slug":"wp_footer%e5%92%8cget_footer%e6%93%8d%e4%bd%9c%e6%9c%89%e4%bb%80%e4%b9%88%e5%8c%ba%e5%88%ab%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.npc.ink\/4616.html","title":{"rendered":"\u201cwp_footer\u201d\u548c\u201cget_footer\u201d\u64cd\u4f5c\u6709\u4ec0\u4e48\u533a\u522b\uff1f"},"content":{"rendered":"
\u6765\u6e90\u4e8e\uff1a<\/p>\n
http:\/\/zh.wordpressask.com\/wp_footer%E5%92%8Cget_footer%E6%93%8D%E4%BD%9C%E6%9C%89%E4%BB%80%E4%B9%88%E5%8C%BA%E5%88%AB%EF%BC%9F.html<\/p><\/blockquote>\n
\u6211\u6b63\u5728\u5f00\u53d1\u4e00\u4e2a\u63d2\u4ef6\uff0c\u6211\u6b63\u5728\u5c1d\u8bd5\u5728\u9875\u9762\u5e95\u90e8\u6dfb\u52a0\u4e00\u884c\u6587\u672c\uff0c\u6211\u770b\u5230\u6709\u4e24\u4e2a\u4f3c\u4e4e\u5408\u7406\u7684\u64cd\u4f5c\uff0c
wp_footer()<\/code>\u548c
get_footer()<\/code> \u3002 wp_footer\u542c\u8d77\u6765\u50cf\u5b83\u53ef\u80fd\u66f4\u9002\u5408\u4e8e\u9700\u8981\u5728\u9875\u9762\u7684\u6700\u540e\uff08\u5982JavaScript\u6587\u4ef6\uff09\u7684\u4ee3\u7801\uff0c\u4f46get_footer\u6ca1\u6709\u5728\u5176wordpress codex\u9875\u9762\u4e0a\u7684\u4efb\u4f55\u6587\u6863\u3002 \u6211\u5e94\u8be5\u7528\u8fd9\u6837\u7684\u4e1c\u897f\uff1f<\/p>\n
Solutions Collecting From Web of \"\u201cwp_footer\u201d\u548c\u201cget_footer\u201d\u64cd\u4f5c\u6709\u4ec0\u4e48\u533a\u522b\uff1f\"<\/strong><\/h4>\n
\n
- <\/li>\n<\/ul>\n
\u8fd9\u4e24\u4e2a\u51fd\u6570\u5b8c\u6210\u4e24\u4e2a\u4e0d\u540c\u7684\u4e8b\u60c5\u3002
wp_footer()<\/code>\u662f\u5728\u4f60\u7684footer.php\u6a21\u677f\u6587\u4ef6\u4e2d\u4f7f\u7528\u7684\u4e00\u4e2a\u94a9\u5b50\uff0c\u4ee5\u786e\u4fdd\u6b63\u786e\u7684\u4ee3\u7801\u88ab\u63d2\u5165\uff08\u4ece\u6838\u5fc3\/\u63d2\u4ef6\/\u7b49\uff09\u5230\u6b63\u786e\u7684\u5730\u65b9\u3002 \u5728\u5176\u4ed6\u6a21\u677f\u6587\u4ef6\u4e2d\u4f7f\u7528
get_footer()<\/code>\u6765\u8c03\u7528footer.php\u6a21\u677f\u6587\u4ef6\u4e2d\u7684\u4ee3\u7801\u3002<\/p>\n
\u6240\u4ee5\u7528\u7b80\u5355\u7684\u8bdd\u6765\u8bf4\uff0c
wp_footer()<\/code>\u4f1a\u83b7\u5f97\u5176\u4ed6\u5f88\u53ef\u80fd\u4e0d\u4f1a\u4ea7\u751f\uff08\u4f46\u662f\u9700\u8981\uff09\u7684\u4ee3\u7801\uff0c\u6240\u4ee5\u5b83\u66f4\u52a0\u62bd\u8c61\u3002
get_footer()<\/code>\u60a8\u5199\u5165\u5230footer.php\u6587\u4ef6\u7684\u786e\u5207\u4ee3\u7801\uff0c\u6240\u4ee5\u5b83\u662fPHP\u7684
include()<\/code>\u51fd\u6570\u7684WordPress\u7248\u672c\u3002<\/p>\n
\u5e0c\u671b\u8fd9\u53ef\u4ee5\u5e2e\u52a9 \uff1a\uff09<\/p>\n
get_footer()<\/code>\u6a21\u677f\u6807\u8bb0\u662f
locate_template()<\/code>\u51fd\u6570\u7684\u81ea\u5b9a\u4e49\u5305\u88c5\u5668\uff0c\u7528\u4e8e\u5728\u6a21\u677f\u6587\u4ef6\u4e2d\u5305\u542b\u6a21\u677f\u90e8\u5206\u6587\u4ef6\u3002
get_footer()<\/code>\u6a21\u677f\u6807\u7b7e\u662fWordPress\u6a21\u677f\u7cfb\u7edf\u7684\u4e00\u90e8\u5206\uff0c\u4e3b\u8981\u7531\u4e3b\u9898\u672c\u8eab\u4f7f\u7528\uff0c\u4ee5\u6307\u5b9a
footer.php<\/code>\u6216
footer-{slug}.php<\/code>\u6587\u4ef6\u4ee5\u5305\u542b\u5728\u5f53\u524d\u6a21\u677f\u4e2d\u3002<\/p>\n
wp_footer()<\/code>\u6a21\u677f\u6807\u8bb0\u662f\u901a\u8fc7
do_action( 'wp_footer' )<\/code>\u8c03\u7528\u7684
wp_footer<\/code>\u64cd\u4f5c\u94a9\u5b50\u7684\u81ea\u5b9a\u4e49\u5305\u88c5\u3002
wp_footer()<\/code>\u6a21\u677f\u6807\u7b7e\u662fWordPress Hooks API\u7684\u4e00\u90e8\u5206\uff0c\u4e3b\u8981\u7528\u4e8e\u63d2\u4ef6\uff0c\u5728\u7f51\u7ad9HTML\u9875\u811a\u4e2d\u6ce8\u5165\u811a\u672c\u3002<\/p>\n