该插件尚未通过WordPress的最新3个主要版本进行测试。 当与较新版本的WordPress一起使用时,可能不再受到维护或支持,并且可能会存在兼容性问题。

FV Top Level Categories

描述

This is a fix of Top Level Category plugin for WordPress 3.1. and further versions. It’s purpose is to provide the same behavior as the original plugin, but in new WordPress versions.

The Top Level Categories plugin allows you to remove the prefix before the URL to your category page. For example, instead of http://foliovision.com/category/work, you can use http://foliovision.com/work for the address of “work” category. WordPress doesn’t allow you to have a blank prefix for categories (they insert category/ before the name), this plugin works around that restriction.

This plugin works also if you have a permalink structure like %postname% or %category%/%postname% — this wasn’t possible in the original version. However, this feature might not work properly for child categories at this point. Test carefully!

Support

Known Issues / Bugs

  1. Issue with paging and feed URLs when using %postname or %category%/%postname% permalink structure should be fixed.

Uninstall

  1. Deactivate the plugin
  2. That’s it! 🙂

安装

  1. Copy the top-level-cats.php file into your wp-content/plugins directory
  2. 通过WordPress的“插件”菜单激活插件
  3. That’s it! 🙂

常见问题

How do I automatically redirect people from the old category permalink?

We recommend that you use the Redirection plugin and add your old an new category links, or use a Regex redirection rule. Make sure you change Tools -> Redirection -> Options -> URL Monitoring to “Don’t monitor”, as there is a bug in that feature (also in latest current version 2.2.5) – not related to FV Top Level Categories.

I’m having issues with child categories when I’m using /%category%/%postname% permalink structure

Make sure your categories have unique slugs – watch out for pages with the same slugs. Normally WordPress uses the category prefix to distinguish page from a category, but with this plugin you need to make sure the slugs are unique, otherwise some pages might turn up instead of categories.

评价

2020 年 6 月 26 日
Simple. Light on code. Easy to understand interface. Handles redirects by itself. Works immediately, without breaking anything else. A delight to have discovered it. I can recommend this to anyone wanting to remove the word, ‘category,’ from their WordPress URLs for child categories.
2017 年 5 月 29 日
After some frustration trying to remove ‘category’ form WordPress URL slugs by other means, this solved the problem. Works with pagination in Avada 5.1.6.
2016 年 9 月 3 日
If you run into pagination issues when using the: /%category%/%postname%/ …Custom Permalink Structure, you will want this plugin!
阅读所有23条评价

贡献者及开发者

“FV Top Level Categories” 是开源软件。 以下人员对此插件做出了贡献。

贡献者

「FV Top Level Categories」插件已被翻译至 5 种本地化语言。 感谢所有译者为本插件所做的贡献。

将“FV Top Level Categories”翻译成您的语言。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志

更新日志

Version 1.9.1 – November 28th, 2019

  • Assing GPL license info
  • Tested with WordPress 5.3

  • Bugfix for AMP category URLs

Version 1.9 – June 1st, 2018

  • Bugfix for AMP category URLs

Version 1.8.2 – May 26th, 2016

  • Self-checking for rewrite rules

Version 1.8.1 – April 7th, 2016

  • Fix for PHP warnings

Version 1.8 – May 22th, 2015

  • Fix for paginated category archives when using custom pagination_base – thanks to odie2!
  • Fix for settings link in plugin row – thanks to odie2!

Version 1.7 – May 12th, 2015

  • Added Polish translation – thanks to maciejka45@gmail.com
  • Added Portuguese translation – thanks to Pedro Mendonça

Version 1.6 – September 19th, 2014

  • Adding support for translations ( Slovak language added )

Version 1.5 – July 22nd, 2014

  • Settings screen added!
  • Category restrictions for post permalinks added! If you use post permalink structure with category in it, you can now restrict which categories will be allowed in the URL. WordPress always picks the category with lowest category ID and that often causes inappropriate categories to show up in URLs – like /featured-content/2014/07/my-post”
  • Or you can simply force only the parent categories to show up in post URLs. So /parent-category/child-category/2014/07/my-post will change to /parent-category/2014/07/my-post
  • If you open the old post URL, proper 301 redirection to the new URL will be used.

Version 1.4

  • fix for WordPress 3.4.1 – category prefix was part of the generated URLs

Version 1.3

  • for for flushing of rewrite rules on plugin activation in WP 3.3

Version 1.2

  • fix for WP 3.3
  • fix for /%categor%/%post-name% permalink structure

Version 1.1.3

  • fix for deeper nested pages

Version 1.1.2

  • fix for /category/child-category redirecting to /child-category page

Version 1.1.1

  • fix for deeper nested categories

Version 1.1

  • fix for WP 3.1

Version 1.0.1

  • original version