WordPress tip: Modify any role name to fit your needs

Simply paste this code into your function.php file. Edit lines 4 and 5 at your convenience.

Thanks to Kevin Chard for the tip!

Details

WordPress trick: load all posts from the current week

Simply paste the code below where you’d like to load posts from the current week. Then don’t forget to display the results as desired.

Thanks to Christian Brückner for the tip!

Details

How to bring back single-column dashboard in WordPress 3.8

Bringing back the single-column dashboard in WordPress 3.8 is pretty easy: just add this code to your theme’s functions.php file.

Thanks to Jeff Starr for the tip!  

Details

How to set the default image size in WordPress galleries

Simply paste the following snippet into your functions.php file:

The desired size can be changed on line 5.

Thanks to emoticode for the cool tip!

WordPress tip: Bulk delete comments with a specific url

Just run the following query on your WordPress database to delete comments with nastyspamurl as url. Don’t forget to replace the table prefix wp_ if your database is using another prefix. And of course, create a backup of your database before running the query!

Details

How to clean up wp_head() without a plugin

Paste the following lines of code into your functions.php file:

Details