WordPress在RSS页面输出博客信息标签:bloginfo_rss

WordPress模板标签bloginfo_rss用于输出博客的一些信息,用法与bloginfo()完全一样 bloginfo_rss( string $show = '' ) 事实上,bloginfo_rss等效于: <?php echo strip_tags(get_bloginfo($show)); ?> 与blogi …

WordPress加载自定义模板标签:get_template_part

WordPress模板标签get_template_part用来加载自定义模板文件 get_template_part( string $slug, string $name = null ) 通常情况下,分类、标签、搜索结果页输出最新文章列表的代码是一样的,因此将这些代码放 …

WordPress输出博客信息标签:bloginfo

WordPress模板标签bloginfo用于输出博客的一些信息,例如博客名称、博客URL、博客描述、WordPress版本等等,几乎每个主题都会用到。 bloginfo( string $show = '' ) 函数参数$sho …

WordPress加载页脚模板标签:get_footer

WordPress模板标签get_footer用来加载页脚模板,即footer.php get_footer( string $name = null ) get_footer标签默认加载footer.php,但可以通过传递一个参数来加载 …

WordPress加载评论模板标签:comments_template

WordPress模板标签comments_template首先会尝试加载评论模板comments.php,如果comments.php不存在,则输出默认的评论区HTML comments_template( string $file = '/comments.php', …

WordPress加载搜索表单标签:get_search_form

WordPress模板标签get_search_form用于加载搜索表单,首先会尝试加载模板文件searchform.php,如果该文件不存在,则输出默认的搜索表单HTML。 get_search_form( bool $echo …

WordPress加载侧边栏模板标签:get_sidebar

WordPress模板标签get_sidebar用于加载侧边栏模板,即sidebar.php get_sidebar( string $name = null ) get_sidebar标签默认加载sidebar.php,但可以通过传递一个 …

WordPress加载头部模板标签:get_header

WordPress模板标签get_header用来加载头部模板,即header.php get_header( string $name = null ) get_header标签默认加载header.php,但可以通过传递一个参数来实现 …

WordPress条件判断标签详细列表

使用WordPress条件判断标签,可以为特定页面加载不同的模板,灵活运用WordPress条件判断标签可以制作出WordPress图片列表、专题页面、不一样的文章页面等。通常我使 …