是否可以有条件分页符?
例如,如果查询字符串中有匹配项,则会忽略帖子的第一个分页符,并且用户可以在单击“下一步”之前读取一行中的两篇帖子?
是否可以有条件分页符?
例如,如果查询字符串中有匹配项,则会忽略帖子的第一个分页符,并且用户可以在单击“下一步”之前读取一行中的两篇帖子?
所以我找到了这个过滤器:
the_posts
https://codex.wordpress.org/Plugin_API/Filter_Reference/the_posts
将其发送到函数,第一个参数是带有分页符的整个post页面。我的计划是通过regex运行它,删除<!--nextpage-->
并将其退回。我看看行不行
我试图根据用户输入的内容过滤结果。function custom_archive() { if ( is_post_type_archive( \'profiles\' ) ) { // if we are on a profiles archive page, edit the query according to the posted data. $data = $_POST[\'networks\'];