以蜗牛般的速度对WP进行“糟蹋”,面临的最大困难是对代码的编写能力,本人的水平仅仅停留于看着说明书对某个文件的某行进行某项CTRL+C和CTRL+V,有很多问题觉得实现起来很简单,可是没有足够的网页制作能力一切都是白搭。
现在面临的几个搞不明白或者不会做的问题分别是:
1.Tags的云图是做出来了,使用的是Jerome’s Keywords 这个插件的附加功能,只是限于空间服务器的问题,云图显示是正常的,但是所有的链接都是错误的。现在的Tag的指向是http://xxxxxx.com/tag/yourtag,这个目录是网站空间上根本不存在的。而文章中的Tags指向地址是http://xxxxx/blog/?tags=yourtag,这个是正常的,我现在考虑的是,能否通过对Tags Cloud代码的修改来实现云图中各个Tag都指向上面这个正常的地址,代码里面没有具体设置,明白的人帮忙看下。还有就是Tags云图里各个Tags是纵向罗列的,怎么改成横向,并做出限制每行5个?
2.模板的归档显示的是最近一年,也就是12个月的,于是在侧边罗列了一堆年月份,怎么使得侧边栏的归档只显示最近三个月的归档链接?归档的调用代码是
<ul class="list-cat">
<?php wp_get_archives('type=monthly'); ?>
</ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
3.使用Jerome’s Keywords 插件配合的“相关日志”插件安装后需要在文章页添加代码,这段代码应该添加到哪里,代码前后需要添加其他标签吗?我添加到了评论框上方,在文章页却但是无法显示。
<?php
if( class_exists('JeromesKeywords') and function_exists('jkeywords_related_posts') ) {
$relatedposts = jkeywords_related_posts();
if (!$relatedposts) {
echo '<p>No related posts</p>';
} else {
echo '<div class="related-posts">
<h3>Related posts:</h3><ul>' . $relatedposts . '</ul>
</div> <!-- [related-posts] -->';
}
}
?>
if( class_exists('JeromesKeywords') and function_exists('jkeywords_related_posts') ) {
$relatedposts = jkeywords_related_posts();
if (!$relatedposts) {
echo '<p>No related posts</p>';
} else {
echo '<div class="related-posts">
<h3>Related posts:</h3><ul>' . $relatedposts . '</ul>
</div> <!-- [related-posts] -->';
}
}
?>
4.侧栏的链接默认是一列显示的,怎么改成两列显示?
-----暂时用的就这些,弱弱的问题,高手们来回答吧
4 Responses