1 get_footer函数

1.1 函数形式与功能

get_footer( string $name = null, array $args = array() )

get_footer主要用于包含主题的footer模板。如果指定了名称,则将包含专门的页脚模板。

比如:

<?php get_footer('special'); ?>

将加载文件名为footer-special.php的模板。

1.2 函数参数

  • $name:string类型(可选),指定的footer页脚模板名称,默认值为null;
  • $args:array类型(可选),传递给footer页脚模板的附加参数,默认值为array();

1.3 函数返回值

如果模板不存在,返回false;如果模板存在,返回void。