我相信您不应该在 functions.php 文件中添加与您的 wordpress 配置不直接相关的代码(例如自定义帖子类型和 php 函数)。
恢复您的 functions.php 文件和您添加到文件中的任何额外代码;然后尝试:
找到 header.php 和<head> </head>
标签之间包含以下代码:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); wp_head(); ?>
作为一个简单的测试,看看 jQuery 是否在标题中工作;
<script type="text/javascript">
$(function(){
$(".scrollable").scrollable();
});
</script>
在标题中添加以下内容:
<style type="text/css">
/*
root element for the scrollable.
when scrolling occurs this element stays still.
*/
.scrollable {
/* required settings */
position:relative;
overflow:hidden;
width: 660px;
height:90px;
}
/*
root element for scrollable items. Must be absolutely positioned
and it should have a extremely large width to accommodate scrollable items.
it's enough that you set width and height for the root element and
not for this element.
*/
.scrollable .items {
/* this cannot be too large */
width:20000em;
position:absolute;
}
/*
a single item. must be floated in horizontal scrolling.
typically, this element is the one that *you* will style
the most.
*/
.items div {
float:left;
}
</style>