wordpress - 使用 the_posts_pagination();没有标题

标签 wordpress pagination

使用 the_posts_pagination ( see codex ) 时,分页显示标题“post navigation”。

是否可以关闭此功能?

例如使用类似的东西:

the_posts_pagination( array(
    'title'              => '', // this should hide the title
    'prev_text'          => __( 'Previous', 'twentyfifteen' ),
    'next_text'          => __( 'Next', 'twentyfifteen' ),
    'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( '', 'nieuwedruk' ) . ' </span>',
) );

最佳答案

有“screen_reader_text”属性可以帮助你

the_posts_pagination( array(
    'screen_reader_text' => ' ', 
    'prev_text'          => __( 'Previous', 'twentyfifteen' ),
    'next_text'          => __( 'Next', 'twentyfifteen' ),
    'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( '', 'nieuwedruk' ) . ' </span>',
) );

注意:因此单引号之间有空格。

关于wordpress - 使用 the_posts_pagination();没有标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29863234/

相关文章:

wordpress - 在目录外使用 WordPress 用户详细信息

hibernate - 如何使用 Spring Security、Hibernate 和行级 ACL 进行分页

php - 在php分页中选择选项后显示每页不同的行?

jquery - 使用 jQuery 在 WordPress 中加载图像

apache - .htaccess 用于 WordPress 多站点导致随机错误 500?

php - 如果在 Woocommerce 中付款失败,如何重新加载结帐页面

php - 使用 twbs 分页插件通过 ajax 更新 smarty 变量

css - WP COMPRESS_CSS

asp.net-mvc - MVC3 分页,每页项目数

c# - 如何在asp gridview中使用分页模板进行自定义分页?