![]() ![]() $site_description = get_bloginfo( 'description', 'display' ) Add the blog description for the home/front page. Place the following code below the last code you added. Typically stuff like the document title seen at the top of your browser (and in search engine results), and links to stylesheets and RSS feeds. The section contains meta-information about a web page. Now we’re going to get into the section of your WordPress Theme. Want to target more IE versions? Just add more conditional comments. If the browser is not IE8, don’t include the “ie8” ID. ![]() If the browser is IE8, the HTML tag gets the “ie8” ID. The opening HTML tag is wrapped in HTML conditional comments. Go ahead and add the following, below the Doctype. This allows us to create targeted CSS styles later on, just for IE 8, without having to create a separate stylesheet. At the same time, if the current browser is Internet Explorer 8, the opening HTML tag will have an ID of “ie8”. We’re going to add an opening HTML tag with some attributes that will make the type of page we’re creating more apparent to the browser. Open up header.php and paste the following code there, before anything else. HTML5 has seen enough adoption that now is a great time to use it in a WordPress Theme. That’s because it’s missing a Doctype telling the browser how to interpret the HTML it’s seeing. Right now your very blank WordPress Theme is technically invalid. If your header.php file is empty, please work through that lesson first, and then come right back. This lesson assumes that you have already added the basic HTML structural elements to your header.php file, which we covered in WordPress Theme Template and Directory Structure. We’re also going to do two essential (and kinda neat) search engine optimization techniques and add some more things to your functions.php file. There’ll be a lot of PHP in this lesson, but don’t despair. Now we get into the nitty-gritty: building up your header.php and validating your theme with an HTML Doctype. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |