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

Simple Post Type Permalinks

描述

Edit the permalink structure of custom post type too easy.

Simple Post Type Permalinks is Simple and Smart than Custom Post Type Permalinks.

Available tags are %post_id%, %postname%, %year%, %monthnum%, %day%, %hour%, %minute%, %second%, %author%.

Requires PHP version 5.3 or higher.

This Plugin published on GitHub.

Please Fork and Pull Request!

Setting on Code

如:

register_post_type( 'foo',
    array(
        "public" => true,
        'has_archive' => true,
        "rewrite" => [
            "with_front" => true
        ],
        "sptp_permalink_structure" => "foo/%post_id%"
    )
);

屏幕截图

  • screenshot-1.png

安装

Manual Installation

  1. Upload the entire /simple-post-type-permalinks directory to the /wp-content/plugins/ directory.
  2. Activate Simple Post Type Permalinks through the ‘Plugins’ menu in WordPress.

Access the permalinks setting by going to Settings -> Permalinks.

常见问题

Which tag that can be used?

Only %post_id% and %postname%.

评价

2018年7月18日
Hi there, actually this was the solution I was looking for, but in my case it's not working as the assignment in the plugins setting is not saved. Useless for me 🙁 Regards Barcelo
2017年9月13日
Simply garbage. It screwed up all of my navigation links (changed them to frontpage links), and of 4 custom post types it worked for 1. For the other 3 it generated 404 errors. Wasted 20 minutes.
阅读所有9条评价

贡献者及开发者

“Simple Post Type Permalinks” 是开源软件。 以下人员对此插件做出了贡献。

贡献者

“Simple Post Type Permalinks”插件已被翻译至2种本地话语言。 感谢所有译者为本插件所做的贡献。

将“Simple Post Type Permalinks”翻译成您的语言。

对开发感兴趣吗?

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

更新日志

2.0.1

  • Tested 4.9

2.0.0

  • Change of class structure.
  • Change namespace.
  • Add abstract Module class.
  • Use autoloader.
  • Remove constructor injection and add setter injection for modules.
  • Support %year%, %monthnum%, %day%, %hour%, %minute%, %second%, %author%.

1.3.1

  • fix pagination link.

1.2.0

  • fix textdomain.

1.1.0

  • Test with WooCommerce and WPML.
  • Admin Bug Fix.
  • Support get_post_type_archive.

1.0.3

  • Admin Bug Fix.

1.0.2

  • Coding Standard Fix.

1.0.0

  • Drop PHP 5.2.

0.1.0

  • First release