标签: WordPress函数

WordPress获取固定链接标签:get_permalink

WordPress获取固定链接标签:get_permalink

发布于2022/07/13
WordPress模板标签get_permalink用于获取文章的固定链接,也就是伪静态链接,需要用在The Loop主循环中,如果在主循环之外使用,需要传递文章ID或包含文章信息的对象。 get_pe···
WordPress获取文章摘要函数:get_the_excerpt

WordPress获取文章摘要函数:get_the_excerpt

发布于2022/07/13
WordPress函数get_the_excerpt用于获取文章的摘要,通常用在归档页输出文章列表时同时输出文章的摘要,文章页面也可以将摘要作为导读输出,更有用的是将摘要内容作为Descrapti···
WordPress输出文章摘要标签:the_excerpt

WordPress输出文章摘要标签:the_excerpt

发布于2022/07/13
WordPress模板标签the_excerpt用于输出文章的摘要,需要用在The Loop主循环。如果当前文章有填写“摘要”,the_excerpt()函数输出这个摘要内容,否则自动截断文章内容的前55个字···
WordPress获取文章数据函数:get_post

WordPress获取文章数据函数:get_post

发布于2022/07/13
WordPress函数get_post用于获取文章的数据,包括文章内容、标题、别名、摘要、发布时间等信息。 get_post( int $post = null, string $output = OBJECT, string $filter = 'ra···