Last active
January 2, 2016 16:29
-
-
Save dmcclintock/8330191 to your computer and use it in GitHub Desktop.
For the forgetful ones of you, such as myself, this little snippet will provide a constant reminder of the status of the "Discourage Search Engines from indexing this site" option in the WordPress settings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* ========================================================================== | |
A courtesy reminder that "discourage SE from indexing" is still checked | |
Place in your WordPress theme "functions.php" file or add as a plugin. | |
by Daniel McClintock (1/9/2014 @ 0100) | |
========================================================================== */ | |
function seo_checker() { | |
$robotscheck = get_option( 'blog_public' ); | |
if ($robotscheck == 0 && is_admin() ) : | |
echo '<span style="width:160px; text-align: center; background-color:#B32525; padding:10px 0; color:white; position:fixed; bottom:0; left:0; border-top: 4px solid #DE4C42; z-index: 15000;">Search Engines Discouraged</span>'; | |
else : | |
echo '<span style="width:160px; text-align: center; background-color:#6CA06C; padding:10px 0; color:white; position:fixed; bottom:0; left:0; border-top: 4px solid #6EDE42; z-index: 15000;">Search Engines Allowed</span>'; | |
endif; | |
} | |
add_filter('admin_footer_text', 'seo_checker'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment