Linux 软件免费装

Custom Guest Authors

开发者 MENJ
更新时间 2026年3月10日 21:18
捐献地址: 去捐款
PHP版本: 8.2 及以上
WordPress版本: 6.9
版权: GPLv2 or later
版权网址: 版权信息

标签

guest author custom fields byline multiple authors author override

下载

1.5 1.2 2.3.1 1.0 1.8 1.2.0 1.8.0 1.9.1 2.0.9

详情介绍:

The Custom Guest Authors plugin (developed and maintained by Mohd Elfie Nieshaem Juferi) lets you replace the WordPress post author display name with one or more custom guest author names, stored as post meta. No separate WordPress user accounts are required. Ideal for sites that publish content from external contributors, translators, or collaborative authors. Guest author names are set directly from the post editor via a dedicated sidebar panel — available in both the classic editor and the Gutenberg block editor. The raw guest-author custom field key also works for programmatic or WP-CLI workflows. This plugin was inspired by a tutorial from WPBeginner. Features Author name override Post type support Display control Structured data Performance Settings Settings are available at Settings › Guest Authors, organised across four tabs: Translation

安装:

  1. Download the plugin zip file.
  2. In your WordPress admin, go to Plugins › Add New › Upload Plugin.
  3. Choose the zip file and click Install Now, then Activate.
Alternatively, install manually:
  1. Upload the custom-guest-authors folder to /wp-content/plugins/.
  2. Go to Plugins in your WordPress admin and activate Custom Guest Authors.
After activation:

常见问题:

Which post types does the plugin support?

By default, the override applies to Posts only. To enable it for Pages or any registered custom post type, go to Settings › Guest Authors › General and check the post types you want. All public post types registered on your site are listed.

How do I set a guest author on a post?

Edit any post of an enabled type. A Guest Authors panel appears in the right-hand sidebar — in the Document panel for the block editor, or as a meta box in the classic editor. Enter one or more names separated by commas and save the post.

How do I set multiple authors?

Enter names separated by commas in the Guest Authors field, e.g. Zamri Vinoth, Firdaus Wong, Ali Hassan. The display format is controlled by the Join Style setting on the Display tab: Natural (Zamri Vinoth, Firdaus Wong and Ali Hassan), Comma (Zamri Vinoth, Firdaus Wong, Ali Hassan), or Ampersand (Zamri Vinoth & Firdaus Wong & Ali Hassan).

Can I set a fallback name that applies to all posts?

Yes. Go to Settings › Guest Authors › General and enter a name in the Fallback Guest Author Name field. This name is shown on any post of an enabled type that has no per-post guest author set. Leave it blank to fall back to the WordPress post author on those posts.

Does this work with block themes and the Full Site Editor?

Yes. The plugin hooks both the_author (used by classic themes) and get_the_author_display_name (the dynamic filter used by block themes via get_the_author_meta( 'display_name' )). This covers all Twenty Twenty-One through Twenty Twenty-Five themes and all FSE themes that use the core/post-author or core/post-author-name blocks.

Does this work with page builders?

Yes, provided the page builder reads the author via the_author(), get_the_author(), or get_the_author_meta( 'display_name' ). This covers Elementor, Beaver Builder, Divi, WPBakery, Kadence, Astra, and GeneratePress, among others.

Can I use the raw custom field directly instead of the editor panel?

Yes. The meta key is guest-author. You can set it via the raw Custom Fields panel (if enabled), programmatically with update_post_meta(), or via WP-CLI. The editor panel is a convenience wrapper over the same key.

Will the guest author name appear on archive pages and in feeds?

By default, yes — the override applies everywhere the author name is displayed. To restrict it to single post pages only, go to Settings › Guest Authors › Display and set Show Override On to Single posts only.

What happens to the author archive link?

When a guest author is active on a post, the author archive URL is automatically suppressed. Guest authors are not WordPress users and have no author archive. The author name is displayed as plain unlinked text.

Does the plugin affect structured data / JSON-LD schema?

Not by default. If you want to remove the author property from JSON-LD schema output, enable the Suppress author from JSON-LD schema toggle on the Advanced tab. This works with both Yoast SEO and Rank Math.

The guest author name is not updating after I changed it. What should I do?

The plugin caches author names per post using WordPress transients. The cache is cleared automatically whenever a post is saved. If you are updating meta programmatically (e.g. via WP-CLI or a migration script), the cache is also cleared on any added_post_meta, updated_post_meta, or deleted_post_meta action. If names are still stale, go to Settings › Guest Authors › Debug and click Clear Cache to flush all cached entries immediately.

How long are author names cached?

The default cache lifetime is 12 hours. You can change this from 1 to 168 hours under Settings › Guest Authors › Advanced. The cache is always invalidated immediately on post save regardless of the TTL.

Does the plugin leave anything behind when deleted?

No. Deleting the plugin via the WordPress Plugins screen runs uninstall.php, which removes all plugin options (cga_default_guest_author, cga_enabled_post_types, cga_join_style, cga_apply_on, cga_cache_ttl, cga_suppress_schema, cga_cache_version) and all cga_* transients from the database.

Is there a Debug tab?

Yes. The Debug tab at Settings › Guest Authors › Debug runs a live diagnostics check on the server: it verifies that filter hooks are registered, checks whether the guest-author meta is set on the most recent published post, confirms that the post type is in the enabled list, tests whether custom-fields support is declared (required for Gutenberg meta writes), and simulates the filter output. A manual post-ID tester lets you check any specific post by ID. A Clear Cache button is also available.

The plugin is not working on my block theme. What should I check?

Open Settings › Guest Authors › Debug and look at the diagnostics table. Confirm that both the_author and get_the_author_display_name filters show as registered. Confirm that the post type is listed as enabled and that custom-fields support is shown as active. If the post type does not support custom fields, the Gutenberg panel will accept input but silently discard it on save — enabling the post type on the General tab corrects this automatically.

Is the plugin compatible with Yoast SEO and Rank Math?

Yes, for the optional schema suppression feature. When Suppress author from JSON-LD schema is enabled on the Advanced tab, the plugin removes the author property from Article-type schema nodes via wpseo_schema_graph (Yoast SEO) and rank_math/schema/article (Rank Math). The author name override itself works independently of any SEO plugin.

Is the plugin translation-ready?

Yes. All strings are wrapped in WordPress i18n functions. A Malay (Malaysia) translation (ms_MY) is bundled. A .pot template file is included for community translations.

更新日志:

2.3.1 2.3.0 2.2.0 2.1.0 2.0.9 2.0.8 2.0.4 2.0.2 2.0.1 2.0.0 1.9.1 1.8.9 1.8.1 1.8.0 1.7.5 1.7.2 1.7.1 1.6.2 1.6 1.5 1.2 1.1 1.0