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.
Installation
- Upload the
custom-guest-authorsdirectory to your/wp-content/plugins/directory. - Activate the plugin through the ‚Plugins‘ menu in WordPress.
- 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.
-
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. -
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Ü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_METAconstant 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 callingget_post_meta()directly, bypassing the transient cache. Now usescga_get_authors(). - Fixed:
useEntityPropingutenberg-sidebar.jsusedpostType || 'post'as fallback on initial render. On Pages and custom post types this transiently read meta from the wrong entity. Changed topostType || ''. - Fixed: Version-based cache flush called
update_option()after theDELETEquery. 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()inadmin.phpremoved. - 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 isget_the_author_display_name. The plugin had been registering a non-existentget_the_author_metafilter 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 onthe_author). - Fixed: Post resolution hardened in all front-end filter functions using
get_post()+get_queried_object()fallback, covering singular page templates beforesetup_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-fieldssupport. The plugin now callsadd_post_type_support()for all enabled post types oninit.
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: /languagesadded 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 withoutwp_unslash()orsanitize_key(). - Fixed:
Requires PHPcorrected 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.xmldeclaring authorised plugin prefixes; allcga_*functions annotated with inlinephpcs:ignorefor Plugin Check compatibility. - Updated:
Requires PHPbumped to 8.2.Tested up toconfirmed 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_redirectbypassing the redirect filter. Callback now registered on bothwp_redirectandwp_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 thecga_{post_id}transient first. - Added:
js/settings.jsfor interactive card state and live join-style preview.
1.8.1
- Fixed: Classic meta box hardcoded to
postandpage; now readscga_enabled_post_types. - Fixed:
cga_suppress_schematoggle not saving correctly for unchecked state. - Fixed:
cga_enabled_post_typescould 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.


