Snippet library
PHP snippets for WordPress.
467 free & Pro snippets and modules. Copy-paste-ready, or import in one click with SnipCraft.
Disable Author Archive Pages
301-redirects all author archive URLs to the homepage, effectively disabling them to reduce user enumeration exposure.
Set Default Admin List Screen Per-Page Count
Sets the default number of rows shown on admin list tables to 25 for users who have not yet changed the preference.
Add Featured Image Column to Posts List
Inserts a thumbnail preview column before the Title column in the wp-admin Posts list table.
Add Custom Body Class on Login Page
Appends a custom CSS class to the body tag on wp-login.php for targeted login-page styling.
Replace "Howdy" Greeting in Admin Bar
Swaps the "Howdy, Username" text in the admin bar with a plain "Hello, Username" for a more neutral tone.
Hide Update Nag for Non-Admins
Removes the WordPress core update notification banner for users without the manage_options capability.
Remove WordPress Logo from Admin Bar
Removes the WordPress logo menu node from the admin toolbar for all users.
Generic Login Error Message
Replaces specific login error messages with a generic one to prevent username and email enumeration.
Hide Admin Bar for Non-Admins on Front End
Removes the front-end admin toolbar for logged-in users who do not have the manage_options capability.
Custom Admin Footer Text
Replaces the default 'Thank you for creating with WordPress' footer credit in wp-admin with your site name.
Remove Dashboard Welcome Panel
Hides the default Welcome to WordPress panel shown at the top of the dashboard for all users.