FWQ
最简单的WordPress手动输入页号并跳转翻页的方法
下面由/” target=”_blank”>wordpress教程栏目给大家介绍最简单的wordpress手动输入页号并跳转翻页的方法,希望对需要的朋友有所帮助! 经常有用户问可不可以弄个手动输入页号并实现跳转的翻页功能,很简单,代码只有四行: 登录后复制 ” method=”get”> 添加到主题分类归档模板的适当位置即可。 代码取自一款叫智能分页的插件:wp smart pagination,插件本身已多年未更新,插件除了上面的代码,还自带翻页代码。 需要完善的:不能显示当前的页号,输入不存在的页号,不能像WP后台文章列表那样跳转到最后页,直接404,这功能很多年前也研究过,最近又想起来了,有高手帮助改进一下吧。 配套样式: .zm-input-number { background: #fff; text-align: center; border-radius: 2px; border: 1px solid #3690cf; } .zm-button { background: #fff; cursor: pointer; border-radius: 2px; border: 1px solid #3690cf; -webkit-appearance: none; } .zm-button:hover { background: #3690cf;…