- alkkdlkx
2 分钟 24 秒之前 - tmhvrb
2 分钟 35 秒之前 - vvqfyciu
2 分钟 36 秒之前 - detqjlm
2 分钟 39 秒之前 - bjebss
2 分钟 43 秒之前 - nlkepn
2 分钟 48 秒之前 - cwuuwc
2 分钟 48 秒之前 - kntqia
2 分钟 48 秒之前 - 自动的功能还是少用~
1 小时 51 分钟之前 - 自动的功能还是少用~
1 小时 52 分钟之前
该函数从当前主题文件夹中包含footer.php模板文件。如果指定了名称,那么函数将包含指定的侧边栏文件footer-special.php。如果主题中没有footer.php文件,那么函数会包含来自默认主题wp-content/themes/default/footer.php的页脚文件。
<?php get_footer( $name ); ?>
$name
(字符串)(可选)对footer-name.php的调用
默认值:None
简单的404页面
下面是一个为“HTTP 404: Not Found”错误(在主题文件中为404.php)而制作的简单模板。
<?php get_header(); ?>
<h2>Error 404 - Not Found</h2>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
多个页脚
不同页面上的不同页脚
<?php
if ( is_home() ) :
get_footer('home');
elseif ( is_404() ) :
get_footer('404');
else :
get_footer();
endif;
?>
get_footer()位于wp-includes/general-template.php中。
get_header, get_sidebar, get_search_form, comments_template, get_footer()
发表新评论