Created
November 19, 2015 08:44
-
-
Save bjornbjorn/9489023b9b4b38c76cf2 to your computer and use it in GitHub Desktop.
Remove "Page Analysis" + "Focus Keyword" functionality from Yoast SEO
This file contains 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
// Note, I used Timber so my functions.php includes a class that extends TimberSite, but the gist here will be the same; | |
// add an action that outputs css in the admin to hide some Yoast SEO features. | |
// in functions.php, add this action: | |
add_action('admin_head', array($this, 'wpseo_css')); | |
// Then you need this wpseo_css function in the same class: | |
/** | |
* This will remove the "Page Analysis" tab from WPSEO + remove the Focus keyword | |
*/ | |
public function wpseo_css() { | |
echo '<style> | |
#linkdex { | |
display:none; | |
} | |
#wpseo_meta .wpseotab.general table.form-table tr:nth-child(2) { | |
display:none; | |
} | |
</style>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment