WordPress will by default output quite a lot of unnecessary stuff on the document header with the
Let’s start removing them. Put following codes to your
functions.php, a recommended way is to hook to the
Comment line by line.
L1: The RSD(Really Simple Discovery) is an API to edit your blog from external services and clients. If you edit your blog exclusively from the WP admin console, you don’t need this.
L2: You really don’t need this either if you are not using Windows Live Writer for your WordPress blog.
L3: If you look at the source of your site, you’ll notice that there is a meta tag generating the WordPress version your site is installing on. This piece of codes removes the tag in case you don’t want to let the world know your site is on WordPress.
L4-L6: They are to remove the next/previous post link and homepage link on document header. Please note that this has nothing to deal with the “next/previous” post that you may want to add at the end of each post.
L7: This is to remove the “shortlink” added by
In addition to above cleanup, you may also want to remove the Emoji styles and JS. Check my previous post on this.