本文我们来完善一下整个框架,前面的框架基本完成,下面是尾部文件footer.php。我们要修改index.php文件和single.php,再添加调用footer.php文件代码。
——首先,新建一个footer.php文件,写入以下代码。
PHP
{* Template Name:公共底部 *} <div class="Blogfooter"> <div class="CopyRight-center"> Copyright © <a href="{$host}">{$name}</a> 版权所有<br/>{$copyright} </div> </div> <div class="top"></div> </div> </body> </html>
——这是尾部文件footer.php文件使用的CSS样式。
CSS
.Blogfooter {text-align:center;margin-right:320px;margin-left:210px;display:block;padding-bottom:20px;}.top {height:40px;width:40px;border:1px solid #ddd;position:fixed;right:20px;bottom:40px;background-image:url(images/top.png);background-repeat:no-repeat;cursor:pointer;border-radius:5px;}
——删除index.php文件中的{</div></body></html>},然后写入以下调用代码。
PHP
{template:footer}
——同理删除single.php文件中的{</div></body></html>},写入以下调用代码。
PHP
{template:footer}