WP Manifestindependent plugin directory
manifest / seo / author-canonical-url

Author Canonical URL

Sets canonical URL for author pages and provides a field to add canonical URL on the user edit page.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/ikoanti/author-canonical-url/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Features & Functionality

Adds a Canonical URL Field to User Profiles Uses show_user_profile and edit_user_profile actions to add a field for setting a canonical URL. The URL is stored as user metadata (canonical_url in wp_usermeta).

Saves Canonical URL on Profile Update Hooks into personal_options_update and edit_user_profile_update to save the URL. Uses esc_url_raw() to sanitize input and validate it using FILTER_VALIDATE_URL. Shows an error message in the admin panel if an invalid URL is entered.

Redirects Author Page to Canonical URL Uses template_redirect to check if the current page is an author archive page. Retrieves the stored canonical URL and issues a 301 permanent redirect if set.