WordPress获取下一篇文章信息函数:get_next_post

WordPress函数get_next_post用于获取下一篇文章的信息,包括:文章内容、摘要、状态、标题、作者、发布时间等。 get_next_post( boolean $in_same_term = false, string $excluded_terms = '', string $taxonomy = 'category' ) 函数参数$in_same_ …

WordPress获取More标签分隔内容函数:get_extended

WordPress函数get_extended用于获取More标签分隔的内容,分别输出More标签前、后、中的内容,稍加变通就可以利用这个标签制作摘要输出、加密内容等。 get_extended( string $post_content ) 函数 …

Bootstrap4 Carousel轮播上下滚动、淡入淡出效果

Bootstrap4 Carousel轮播非常简单好用,默认左右滚动效果,但通常的需求是三种情况:左右滚动(水平滚动)、上下滚动(垂直滚动)、淡入淡出。 通过增加少量的CSS,就可以为Bootstrap …

WordPress获取文章子元素函数:get_children

WordPress函数get_children可用于获取文章下的附件、子页面,通常我用来获取文章缩略图。 get_children( array $args = '', constant $output = OBJECT ) 函数参数$args数组或字符串值 get_children …

WordPress获取最早或最近文章函数:get_boundary_post

WordPress函数get_boundary_post用于获取最早或最近发表的一篇文章,在实际应用中使用得非常少。 get_boundary_post( boolean $in_same_term = false, string $excluded_terms = '', boolean $start = true, string $taxonomy = 'category' ) 函数参数$in_same_c …

WordPress获取相邻文章函数:get_adjacent_post

WordPress函数get_adjacent_post用于获取相邻文章的信息,包括文章ID、文章发表时间、文章标题、文章别名、文章内容和文章摘要等。 get_adjacent_post( boolean $in_same_term = false, array $excluded_terms = '', boolean $previous = true, string $taxonomy …

WordPress输出搜索关键词标签:the_search_query

WordPress模板标签the_search_query用于输出搜索关键词,通常用在搜索表单和搜索结果页中。 the_search_query() 该函数没有任何参数,直接调用即可。 函数使用示例<form method="get" id="searchform" action="<?php …

Unslider插件增加鼠标悬停时停止播放功能

Unslider是一款轻量的jQuery轮播插件,简单好用,但默认不支持鼠标悬停时停止播放功能,这是一般轮播插件都支持的功能,像Unslider这样优秀的插件应该是支持的,然而我读 …

WordPress文章查询标签:query_posts

WordPress模板标签query_posts用来限定The Loop循环的查询条件,query_posts()函数可以产生一个新的查询SQL的参数,而忽略URL接收的参数。如果不 …

WordPress获取文章标签:get_posts

WordPress模板标签get_posts用于获取文章信息,通常用于输出最新文章列表、随机文章、指定分类文章等等,在用WordPress制作CMS网站时非常有用。 get_posts( array $args = null ) 函数 …