开发者 | coffee2code |
---|---|
更新时间 | 2023年8月23日 06:37 |
捐献地址: | 去捐款 |
PHP版本: | 3.3 及以上 |
WordPress版本: | 6.3 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
c2c_linkify_posts()
, which allow you to easily specify posts to list and how to list them. Posts are specified by either ID or slug. See other parts of the documentation for example usage and capabilities.
Particularly handy when used in conjunction with the post custom field feature of WordPress. You could define a custom field for "Related Posts" or "Additional Products" and manually list out post IDs, then utilize the function provided by this plugin to display links to those posts in a custom manner.
Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage
/wp-content/plugins/
).c2c_linkify_posts()
template tag in one of your templates (be sure to pass it at least the first argument indicating what post IDs and/or slugs to linkify -- the argument can be an array, a space-separate list, or a comma-separated list). Other optional arguments are available to customize the output.If a given ID/slug doesn't match up with an existing post then that item is ignored without error.
Whether you use the template tag or the widget, specify the following information for the appropriate fields/arguments:
<ul><li>
(or <ol><li>
)</li></ul>
(or </li></ol>
)</li><li>
Yes.
.gitignore
filecomposer.json
for PHPUnit Polyfill dependencylinkify_post_ids()
, adds DEVELOPER-DOCS.md, notes compatibility through WP 5.8+, and minor reorganization and tweaks to unit tests.
Details:
linkify_post_ids()
phpunit/
into tests/phpunit/
phpunit/bin/
into tests/