- Navigate to the WordPress plugin directory of your development installation.
- Create a new directory called ch2-favicon.
- Use a web service, such as http://getfavicon.org, to retrieve a website's favicon (for example, http://www.packtpub.com) and store it in the plugin directory with its default name (favicon.ico).
- Navigate to the plugin directory and create a new text file called ch2-favicon.php.
- Open the new file in a code editor and add an appropriate header at the top of the plugin file, naming the plugin Chapter 2 - Favicon.
- Add the following line of code to register a function that will be called when WordPress renders the page header:
add_action( 'wp_head', 'ch2fi_page_header_output' );
- Add the following code ...