How to modify the WordPress generated robots.txt file with PHP code

In a default WordPress installation, the robots.txt file does not exist in your web site’s root directory. WordPress dynamically generates robots.txt content for your web site when it receives a request for the robots.txt file. The technique shown in this article will modify the contents of WordPress’ dynamically generated robots.txt contents.

Add async or defer to script tags in WordPress

In this article, we will intercept the generation of script tags, and alter the output in an attempt to improve web site performance. The filter code will add either a defer or async attribute to the script tag.

Add text above the WordPress Editor

In this article, we will print a reminder message for the user above the WordPress Editor metabox by hooking into the response generation code at the point right after the post title has been printed at the top of the WordPress editor page in the admin area.