Direkt zum Inhalt wechseln
WordPress.org

Deutsch (Österreich)

  • Themes
  • Plugins
  • Über
  • Community
  • FAQ
  • Get WordPress
Get WordPress
WordPress.org

Plugin Directory

Custom Guest Authors

  • Submit a plugin
  • My favorites
  • Log in
  • Submit a plugin
  • My favorites
  • Log in

Custom Guest Authors

Von Mohd Elfie Nieshaem Juferi
Herunterladen
  • Details
  • Rezensionen
  • Installation
  • Entwicklung
Support

Beschreibung

The Custom Guest Authors plugin (developed and maintained by Mohd Elfie Nieshaem Juferi) allows you to set custom guest author names or multiple guest authors for posts using a custom field key named guest-author. For multiple authors, separate the names with commas. Ideal for sites with multiple contributors where separate WordPress user accounts are unnecessary.

From version 1.6 onward, guest authors can be set directly from the post editor — no need to use the raw custom fields panel. A dedicated sidebar panel is available in both the classic editor and the block editor (Gutenberg).

This plugin was inspired by a tutorial from WPBeginner.

Screenshots

Installation

  1. Upload the custom-guest-authors directory to your /wp-content/plugins/ directory.
  2. Activate the plugin through the ‚Plugins‘ menu in WordPress.
  3. Edit any post or page — a „Guest Authors“ panel will appear in the sidebar.

FAQ

Can I use this for custom post types?

Yes. Go to Settings › Guest Authors › General tab and check any public post types you want the override to apply to.

How do I set custom guest authors for a post?

Edit a post — a „Guest Authors“ panel appears in the right-hand sidebar of both the classic and block editors. Enter one name or multiple names separated by commas, e.g. „John Doe, Jane Smith“.

Can I still use the raw custom field directly?

Yes. The field key is guest-author. Setting it via the custom fields panel or programmatically works as before.

I updated a guest author name but the old name is still showing. Why?

This was a bug in versions prior to 1.5 where the cached author name would persist for up to 12 hours. Version 1.5 fixed this — the cache is now invalidated immediately whenever a post is saved or its meta is updated.

Rezensionen

There are no reviews for this plugin.

Mitwirkende & Entwickler

„Custom Guest Authors“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:

Mitwirkende
  • Mohd Elfie Nieshaem Juferi

Übersetze „Custom Guest Authors“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.

Änderungsprotokoll

2.0.9

  • Added: CGA_NO_META constant replaces the '__cga_none__' sentinel string literal that was repeated inline in three functions.
  • Added: cga_get_authors() shared helper encapsulates the full transient cache read/write path. Eliminates ~20 lines of duplicated cache logic previously copied across three functions.
  • Added: cga_format_authors() shared helper encapsulates the multi-author join pipeline. Eliminates the formatting block previously duplicated across two functions.
  • Fixed: custom_guest_authors_name_meta() (block theme path) did not respect the „Show Override On“ setting. Per-post guest author names were appearing on archive pages even when set to Singular only. Both filter callbacks now apply an identical context gate.
  • Fixed: custom_guest_authors_strip_link() was calling get_post_meta() directly, bypassing the transient cache. Now uses cga_get_authors().
  • Fixed: useEntityProp in gutenberg-sidebar.js used postType || 'post' as fallback on initial render. On Pages and custom post types this transiently read meta from the wrong entity. Changed to postType || ''.
  • Fixed: Version-based cache flush called update_option() after the DELETE query. A write failure would cause the flush to re-run on every request. Order reversed — version recorded first.
  • Fixed: Duplicate docblock before cga_render_settings_page() in admin.php removed.
  • Fixed: Debug tab transient display now shows a human-readable label instead of the raw __cga_none__ sentinel string.

2.0.8

  • Added: Live diagnostics panel on the Debug tab. Checks filter hook registration, guest-author meta presence, post type enablement, custom-fields support, and runs a filter simulation on a real post. Includes a manual post-ID tester.
  • Fixed: Root cause of author name never appearing on block themes (TT25, TT24, all FSE themes). get_the_author_meta() fires a dynamic filter — get_the_author_{$field} — so the correct hook name for display_name is get_the_author_display_name. The plugin had been registering a non-existent get_the_author_meta filter since v2.0.5; the callback was never called on any block theme frontend.
  • Fixed: Stale empty-string transient cache permanently blocking the default guest author. The cache sentinel is now __cga_none__ so a cached „no meta“ result no longer prevents the default from showing.
  • Fixed: Automatic cache flush on plugin update purges stale transients from older installs without requiring a manual Clear Cache.
  • Fixed: Default guest author not appearing on archive and listing pages. The apply_on = "singular" context gate was placed before the default author fallback and caused early exit on non-singular pages. The gate now only applies to per-post meta overrides.
  • Fixed: Filter hooks raised to priority 20 to run after ent2ncr (registered at priority 8 by another plugin on the_author).
  • Fixed: Post resolution hardened in all front-end filter functions using get_post() + get_queried_object() fallback, covering singular page templates before setup_postdata() runs, nested queries, and page-builder contexts.

2.0.4

  • Fixed: Guest author names saved via the Gutenberg sidebar panel were silently discarded. WordPress only writes post meta via the REST API for post types that declare custom-fields support. The plugin now calls add_post_type_support() for all enabled post types on init.

2.0.2

  • Changed: Plugin architecture refactored from a 1,175-line monolith. 901 lines of admin-only code were parsed on every front-end request. Code is now split into conditional includes: always-loaded front-end filters, cache, and meta registration; admin-only meta box and settings page.
  • Fixed: Author filter was returning esc_html($name) — HTML-escaped text — instead of a raw plain-text value. Author names containing &, <, >, or " displayed as literal HTML entities on screen.
  • Fixed: Domain Path: /languages added to plugin file header.

2.0.1

  • Fixed: Fatal PHP parse error on activation — plugin could not be activated at all.
  • Fixed: load_plugin_textdomain() was absent; bundled Malay translation never loaded.
  • Fixed: $_GET['cga_action'] accessed without wp_unslash() or sanitize_key().
  • Fixed: Requires PHP corrected from 8.5 to 8.2.

2.0

  • Improved: Settings UI completely redesigned with pill-style tab navigation, navy-to-teal gradient card headers, and stone accent divider.
  • Added: Debug tab — promoted from the Advanced tab, with System Information and Cache Status cards and a Clear Cache button.

1.9.1

  • Added: phpcs.xml declaring authorised plugin prefixes; all cga_* functions annotated with inline phpcs:ignore for Plugin Check compatibility.
  • Updated: Requires PHP bumped to 8.2. Tested up to confirmed at 6.9.

1.8.9

  • Fixed: Radio and checkbox cards showed no visual feedback on click; interactive state now updated via delegated JS listener.
  • Fixed: Join style preview was static; now updates live on radio card change.
  • Fixed: Active settings tab lost after save due to wp_safe_redirect bypassing the redirect filter. Callback now registered on both wp_redirect and wp_safe_redirect.
  • Fixed: custom_guest_authors_suppress_url() bypassed the transient cache, causing one extra DB query per post on archive pages. Now reads from the cga_{post_id} transient first.
  • Added: js/settings.js for interactive card state and live join-style preview.

1.8.1

  • Fixed: Classic meta box hardcoded to post and page; now reads cga_enabled_post_types.
  • Fixed: cga_suppress_schema toggle not saving correctly for unchecked state.
  • Fixed: cga_enabled_post_types could not be saved as empty array.

1.8

  • Added: Post type selection (checkbox grid replacing single „Override on Pages“ toggle).
  • Added: Multi-Author Join Style — Natural, Comma, Ampersand.
  • Added: Show Override On — singular views only or all views.
  • Added: Configurable cache lifetime (1–168 hours, default 12).
  • Added: Suppress author from JSON-LD schema (Yoast SEO and Rank Math).
  • Added: Debug Information table on the Advanced tab.

1.7.5

  • Added: Malay (Malaysia) translation (ms_MY). POT template file.
  • Removed: Author name prefix feature (produced doubled output with theme labels).
  • Fixed: Author name now output as plain unlinked text (guest authors have no author archive).

1.7.2

  • Improved: Settings page redesigned to match plugin suite design language.

1.7.1

  • Added: Settings page with General and Display tabs, default guest author, live preview.

1.6.2

  • Fixed: Classic meta box appeared twice in block editor. Gutenberg JS crash on initial render. Deprecated use_block_editor_for_post_type() replaced.

1.6

  • Added: Classic editor meta box and Gutenberg sidebar panel. REST API meta registration. CSS/JS assets separated into /css/ and /js/.

1.5

  • Fixed: Transient cache invalidated on post save and on programmatic meta updates.

1.2

  • Added: Support for multiple comma-separated guest authors.

1.1

  • Added: Transient caching, input sanitization, output escaping.

1.0

  • Initial release.

Meta

  • Version 2.0.9
  • Last updated vor 2 Wochen
  • Active installations Weniger als 10
  • WordPress version 5.7 oder höher
  • Tested up to 6.9.1
  • PHP version 8.2 oder höher
  • Language
    English (US)
  • Tags
    bylinecustom fieldsguest authormultiple authors
  • Erweiterte Ansicht

Bewertungen

No reviews have been submitted yet.

Meine Bewertung hinzufügen

See all reviews

Mitwirkende

  • Mohd Elfie Nieshaem Juferi

Support

Möchtest du etwas sagen? Brauchst du Unterstützung?

Supportforum anzeigen

Spenden

Möchtest du die Weiterentwicklung dieses Plugins unterstützen?

Für dieses Plugin spenden

  • About
  • News
  • Hosting
  • Privacy
  • Showcase
  • Themes
  • Plugins
  • Patterns
  • Learn
  • Support
  • Developers
  • WordPress.tv ↗
  • Get Involved
  • Events
  • Donate ↗
  • Five for the Future
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org

Deutsch (Österreich)

  • Visit our X (formerly Twitter) account
  • Visit our Bluesky account
  • Visit our Mastodon account
  • Visit our Threads account
  • Visit our Facebook page
  • Visit our Instagram account
  • Visit our LinkedIn account
  • Visit our TikTok account
  • Visit our YouTube channel
  • Visit our Tumblr account
Code ist Poesie.
The WordPress® trademark is the intellectual property of the WordPress Foundation.