更换模板为apple theme

yo2的apple theme,如果打开页面列表,并且比较长的话,将会引起换行,导致整个主题变形。

通过向dupola讨教,从最新的模板代码拷贝了一些代码后,完美解决

具体如下:

1.在css文件中添加headernavi的显示代码

/*- begin Navigation in Header  */
.headernavi {
width: 940px;
text-align: left;
height: 35px;
list-style: none;
clear:both;
margin-top:10px;
margin-bottom:-15px;
margin-left:auto;
margin-right:auto;
background: url(../images/headernavi.gif) no-repeat;
}
.headernavi ul {
text-align: center;
padding: 8px 8px 8px;
margin: 0;
}
.headernavi li {
display: inline;
margin: 0;
}
.headernavi li a {
color: #0066cc;
font-weight:bold;
padding: 5px 5px 5px;
font-size: 14px;
}
.headernavi li a:hover {
background: #333;
color: #eee !important;
text-decoration: none;
}
/*- end Navigation in Header  */

由于原来的代码是在header.css,而yo2只允许修改style.css,所以,就直接添加在style.css的后面就可以了。

2.修改页首文件,就是header.php

添加

</div>
</div>
<!–end header-search–>

</div>
</div><!–end header–>

<!– begin category  –>
<div class=”headernavi”>
        <ul>
<li><a href=”<?php echo get_settings(‘home’); ?>/” title=”返回首页”>Home</a></li>
<?php wp_list_pages(’sort_column=menu_order&depth=1&title_li=’); ?>
<!– <?php wp_register(‘<li>’,'</li>’); ?>  –>
        </ul>
</div>
<!– end category  –>

<div id=”content”><!–begin content–>

其中,红色为添加的显示page列表的

当然,需要把原来的显示列表的代码关闭

3.保存,刷新,搞定。