AI Verified

Name

Disable author pages

About

This snippet will disable the auto-generated author pages

Language

PHP

Rating

Voted: 1 by 1 user(s)

Codevault

tinny

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:

23/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 pages

 
                    
1function disable_author_page() {
2 global $wp_query;
3 
4 if ( is_author() ) {
5 // Redirect to homepage, set status to 301 permenant redirect.
6 // Function defaults to 302 temporary redirect.
7 wp_redirect(get_option('home'), 301);
8 exit;
9 }
10}

1

Related Snippets

Please see some snippets below related to this snippet..

General

AI Verified

0

Add Tickets Pro plain meta data on WooCommerce Order for Zapier

Added: 11 months ago

Last Updated: 11 months ago

Alters the Modern Tribe Tickets Pro meta data to a simpler format on the WooCommerse Order so that it's easier to integrate with other systems on Zapier.

General

Unverified

0

Highlight-Text

Added: 3 months ago

Last Updated: 3 months ago

Highlight Text within a Text Editor or a Heading

General

AI Verified

0

Remove WPML Tag

Added: 8 months ago

Last Updated: 8 months ago

Hide the WPML version from the source code

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

WordPress Admin

AI Verified

1

Hide Login Errors

Added: 1 year ago

Last Updated: 1 year ago

Hide login error making them more generic to avoid giving any hint to potential harmful attacks

WordPress Admin

AI Verified

1

Disable plugin updates

Added: 1 year ago

Last Updated: 1 year ago

Some plugins just need to stay to that version. This snippet ensures that no automatic or manual update can be performed my anyone.

General

AI Verified

1

Disable author pages

Added: 1 year ago

Last Updated: 1 year ago

This snippet will disable the auto-generated author pages