This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
themes:tutorial [2013/10/23 23:50] datiswous [Editing] |
themes:tutorial [2016/08/22 21:23] Timbow |
||
---|---|---|---|
Line 130: | Line 130: | ||
**3** ''<?php get_header(); ?>'' is required in the head section by some plugins. It won't have any visible effect. | **3** ''<?php get_header(); ?>'' is required in the head section by some plugins. It won't have any visible effect. | ||
- | **4** The relative link to the css is broken already so I make it an absolute link by replacing ''href="style.css"'' with ''href="<?php get_theme_url(); ?>/style.css"'' | + | **4** The relative link to the css is broken so I make it an absolute link by replacing ''href="style.css"'' with ''href="<?php get_theme_url(); ?>/style.css"'' |
That's the head section done and now that the link to the css is mended I can look at my new GS page in my browser with a little more pleasure. | That's the head section done and now that the link to the css is mended I can look at my new GS page in my browser with a little more pleasure. | ||
Line 229: | Line 229: | ||
**16** We ought to Link to GS with ''<?php get_site_credits(); ?>'' | **16** We ought to Link to GS with ''<?php get_site_credits(); ?>'' | ||
- | **17** Some plugins require ''<?php get_footer(); ?>''. It won't have any visible effect. | + | **17** Some plugins require ''<?php get_footer(); ?>''. It is for scripts, nothing to do with the page footer and it won't have any visible effect. We will put it just before the closing tag </body>. |
That's it for a basic page | That's it for a basic page | ||
Line 236: | Line 236: | ||
<?php get_site_name(); ?> | <?php get_site_name(); ?> | ||
© <?php echo date('Y'); ?> | Design by <a href="http://www.html5-templates.co.uk" target="_blank">HTML5 Templates</a> <?php get_site_credits(); ?> | © <?php echo date('Y'); ?> | Design by <a href="http://www.html5-templates.co.uk" target="_blank">HTML5 Templates</a> <?php get_site_credits(); ?> | ||
- | <?php get_footer(); ?> | ||
</footer></code> | </footer></code> | ||
<code></div> <!-- end-of-"page" --></code> | <code></div> <!-- end-of-"page" --></code> | ||
- | <code></body> | + | <code> <?php get_footer(); ?> |
+ | </body> | ||
</html> | </html> | ||
</code> | </code> | ||
- | . ==== This is my new file template.php: ==== | + | ==== This is my new file template.php: ==== |
<code php> | <code php> | ||
Line 256: | Line 256: | ||
* | * | ||
*****************************************************/ | *****************************************************/ | ||
- | ?></code> | + | ?> |
- | <code php><!DOCTYPE html> | + | <!DOCTYPE html> |
<html lang=en> | <html lang=en> | ||
- | </code> | ||
- | <code php><head> | + | |
+ | <head> | ||
<meta charset=UTF-8> | <meta charset=UTF-8> | ||
<title><?php get_page_clean_title(); ?> — <?php get_site_name(); ?></title> | <title><?php get_page_clean_title(); ?> — <?php get_site_name(); ?></title> | ||
<?php get_header(); ?> | <?php get_header(); ?> | ||
<link href="<?php get_theme_url(); ?>/style.css" rel="stylesheet" type="text/css" media="screen" /> | <link href="<?php get_theme_url(); ?>/style.css" rel="stylesheet" type="text/css" media="screen" /> | ||
- | </head></code> | + | </head> |
- | <code php><body id="<?php get_page_slug(); ?>" ></code> | + | <body id="<?php get_page_slug(); ?>" > |
- | <code><div id="page"></code> | + | <div id="page"> |
- | <code php><header> | + | <header> |
<a href="<?php get_site_url(); ?>"><img src="<?php get_theme_url(); ?>/images/logo.png" width="303" height="82" alt="<?php get_site_name(); ?>" /></a> | <a href="<?php get_site_url(); ?>"><img src="<?php get_theme_url(); ?>/images/logo.png" width="303" height="82" alt="<?php get_site_name(); ?>" /></a> | ||
<br /> | <br /> | ||
<img src="<?php get_theme_url(); ?>/images/bg_banner_grey.gif" width="980" height="5" alt="logo_banner" /> | <img src="<?php get_theme_url(); ?>/images/bg_banner_grey.gif" width="980" height="5" alt="logo_banner" /> | ||
- | </header></code> | + | </header> |
- | <code php><div id="content"></code> | + | <div id="content"> |
- | <code php><div class="post"> | + | <div class="post"> |
<h2>About Beady Site</h2> | <h2>About Beady Site</h2> | ||
<p>Bla bla bla a load of old nonsense goes here in this area, move on nothing of interests to read here just a load of old nonsense.</p> | <p>Bla bla bla a load of old nonsense goes here in this area, move on nothing of interests to read here just a load of old nonsense.</p> | ||
<p>Bla bla bla a load of old nonsense goes here in this area, move on nothing of interests to read here just a load of old nonsense.</p> | <p>Bla bla bla a load of old nonsense goes here in this area, move on nothing of interests to read here just a load of old nonsense.</p> | ||
<hr /> | <hr /> | ||
- | </div></code> | + | </div> |
- | <code php><div id="left"> | + | <div id="left"> |
<h2><?php get_page_title(); ?></h2> | <h2><?php get_page_title(); ?></h2> | ||
<?php get_page_content(); ?> | <?php get_page_content(); ?> | ||
- | </div></code> | + | </div> |
- | <code php><div id="right"> | + | <div id="right"> |
<?php get_component('sidebar');?> | <?php get_component('sidebar');?> | ||
- | </div></code> | + | </div> |
- | <code php></div> <!-- end-of-"content" --></code> | + | </div> <!-- end-of-"content" --> |
- | <code php><div id="sidebar"> | + | <div id="sidebar"> |
<ul> | <ul> | ||
<li> | <li> | ||
Line 305: | Line 305: | ||
<br /> | <br /> | ||
<p> | <p> | ||
- | <a href="http://validator.w3.org/check?uri=referer"><img src="images/HTML5_Logo.png" alt="Valid HTML5" /> </a> | + | <a href="http://validator.w3.org/check?uri=referer"><img src="<?php get_theme_url(); ?>/images/HTML5_Logo.png" alt="Valid HTML5" /> </a> |
</p> | </p> | ||
<br /> | <br /> | ||
Line 315: | Line 315: | ||
<a href="http://creativecommons.org/licenses/by/3.0/"> <img style="border:0;width:88px;height:31px"src="http://i.creativecommons.org/l/by/3.0/88x31.png" alt="Creative Commons Attribution 3.0 Unported License!" /> </a> | <a href="http://creativecommons.org/licenses/by/3.0/"> <img style="border:0;width:88px;height:31px"src="http://i.creativecommons.org/l/by/3.0/88x31.png" alt="Creative Commons Attribution 3.0 Unported License!" /> </a> | ||
</p> | </p> | ||
- | </div></code> | + | </div> |
- | <code php><div style="clear: both;"> </div> | + | <div style="clear: both;"> </div> |
- | <img src="<?php get_theme_url(); ?>/images/bg_banner_grey.gif" width="980" height="5" alt="logo_banner" /></code> | + | <img src="<?php get_theme_url(); ?>/images/bg_banner_grey.gif" width="980" height="5" alt="logo_banner" /> |
- | <code php><footer> | + | <footer> |
<?php get_site_name(); ?> | <?php get_site_name(); ?> | ||
© <?php echo date('Y'); ?> | Design by <a href="http://www.html5-templates.co.uk" target="_blank">HTML5 Templates</a> <?php get_site_credits(); ?> | © <?php echo date('Y'); ?> | Design by <a href="http://www.html5-templates.co.uk" target="_blank">HTML5 Templates</a> <?php get_site_credits(); ?> | ||
<?php get_footer(); ?> | <?php get_footer(); ?> | ||
- | </footer></code> | + | </footer> |
- | <code></div> <!-- end-of-"page" --></code> | + | </div> <!-- end-of-"page" --> |
- | <code></body> | + | </body> |
- | </html> | + | </html></code> |
- | </code> | + | |
====Content==== | ====Content==== | ||