wordpress the_content函数
模板标签 the_content() 显示当前文章的内容。该标签必须在 WordPress 主循环(loop)中,该标签必须在 WordPress 主循环(loop)中。若文章使用快速标签 来截取摘要,the_content()标签将只在非单篇文章或非固定链接文章上显示前的摘要部分。the_content()标签可包含一个规定内容和样式的参数,该参数会生成“继续阅读全文”的链接。
[pcsh lang=”php” tab_size=”4” message=”” hl_lines=”” provider=”manual”]
<?php the_content( $more_link_text, $strip_teaser, $more_file ); ?>
[/pcsh]
- $more_link_text: (字符串)(可选)“more”链接的链接文本, 默认值: ‘(more…)’
- $strip_teaser:(布尔型)(可选)显示(FALSE)或隐藏(TRUE)more链接前的文本。默认值:FALSE
- $more_file: (字符串)(可选)more链接所指向的文件 默认值:当前文件
<?php the_content("Continue reading " . the_title('', '', false)); ?>
[/pcsh]
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Dev!