AI Verified

Name

Disable author archives

About

Removes the author archive section and redirects all links to author archives to the homepage. Perfect for blogs where there is only a single author.

Language

PHP

Rating

Voted: 0 by 0 user(s)

Codevault

shea

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: 6.1

Our AI bot has checked this snippet is compatable up to wordpress version: 6.1

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

History

Last modified:

20/11/2022

Important Note

This snippet has the following status:

AI Verified

This snippet has been tested by our AI bot, see any comments below.

AI Bot Comments:

Found 0 vulnerabilities

Disable author archives

 
                    
1add_filter( 'author_link', function ( $link ) {
2 return home_url( 'about' );
3});
4 
5add_action( 'template_redirect', function () {
6 if ( is_author() ) {
7 wp_redirect( home_url( 'about' ) );
8 exit;
9 }
10});

0

Related Snippets

Please see some snippets below related to this snippet..

General

AI Verified

0

Add Custom Content After First Image

Added: 4 months ago

Last Updated: 2 months ago

Use this hook to add custom content or Affiliate message after the first image in Post Content.

General

AI Verified

0

Remove Image Link from Content

Added: 4 months ago

Last Updated: 2 months ago

Remove Images Link from Post/Page Content

General

AI Verified

1

Allow SVG

Added: 4 months ago

Last Updated: 2 months ago

Allow SVG upload without a plugin

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

WordPress Admin

AI Verified

11

Change admin footer text

Added: 6 months ago

Last Updated: 2 months ago

Customises the footer text in the WordPress dashboard.

General

AI Verified

1

Make upload filenames lowercase

Added: 2 months ago

Last Updated: 2 months ago

Ensures that the filenames of all uploaded files are converted to lowercase, for consistency.

General

AI Verified

0

Disable author archives

Added: 2 months ago

Last Updated: 2 months ago

Removes the author archive section and redirects all links to author archives to the homepage. Perfect for blogs where there is only a single author.