简体   繁体   English

WordPress分页:WP-PageNavi和永久链接不起作用

[英]Wordpress Pagination: WP-PageNavi and Permalinks doesn't work

I have a clean installation of latest Wordpress version on my local webserver. 我在本地网络服务器上全新安装了Wordpress最新版本。 Twenty Twelve Theme by default and WP-Pagenavi plugin installed for Numeric pagination. 默认情况下,十二十二个主题和WP-Pagenavi插件安装用于数字分页。

I set permalinks for my categories and postslike this: 我为我的类别和帖子设置了永久链接,如下所示:

http://wordpress352ru/%category%/%postname%/

Now I can access category "shows" archive with link http://wordpress352ru/shows/ 现在,我可以通过链接http://wordpress352ru/shows/访问“表演”类别档案

Pagination links on that page now look like: 该页面上的分页链接现在看起来像:

http://wordpress352ru/shows/page/2/ and it doesn't work. http://wordpress352ru/shows/page/2/ ,它不起作用。

If I open index page and then click on category shows link then pagination links on shows category page look like this: 如果我打开索引页面,然后单击类别显示链接,则显示类别页面上的分页链接如下所示:

http://wordpress352ru/category/shows/page/2/ and it works. http://wordpress352ru/category/shows/page/2/ ,并且可以使用。

But I'd like to pagination links would look like this instead and worked: 但是我想将分页链接改为这样并起作用:

http://wordpress352ru/shows/page/2/

Without word "category" in the link. 链接中没有单词“ category”。 How can I set this to work? 如何设置此功能? Thanks in advance! 提前致谢!

There are plugins out there for this, but here is one very easy way of doing it: http://www.wprecipes.com/how-to-remove-category-from-your-wordpress-url 那里有用于此目的的插件,但这是一种非常简单的方法: http : //www.wprecipes.com/how-to-remove-category-from-your-wordpress-url

EDIT 编辑

Once you've done the above, your pagination should work just fine. 完成上述操作后,分页应该可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM