我是WordPress的新手,正在使用最新版本。我正在尝试添加此库https://github.com/pinceladasdaweb/tweetlight 从推特上获取最新推文。Tweets应该显示在索引文件中。如果要查看这些文件,必要的文件包括request.php
在外部和api directory
. 我应该把它们放在哪里?
我试着把它们放在主题文件中,但没有成功。
谢谢
我是WordPress的新手,正在使用最新版本。我正在尝试添加此库https://github.com/pinceladasdaweb/tweetlight 从推特上获取最新推文。Tweets应该显示在索引文件中。如果要查看这些文件,必要的文件包括request.php
在外部和api directory
. 我应该把它们放在哪里?
我试着把它们放在主题文件中,但没有成功。
谢谢
github repo似乎是一个自定义代码,您需要将其放入主题目录,使用您的twitter凭据更新配置文件,并尝试将此代码放入您将使用的任何预期主题文件(例如index.php)的正文中
<h1>Tweets of a certain user</h1>
<div class="stream">
<h2><span>Twitter</span></h2>
<ul class="timeline"></ul>
</div>
<h1>Tweets of a certain user with profile image</h1>
<div class="stream">
<h2><span>Twitter</span></h2>
<ul class="timeline-profile-image"></ul>
</div>
<h1>HashTag: #html5</h1>
<div class="stream">
<h2><span>Twitter</span></h2>
<ul class="hashtag"></ul>
</div>
<script type="text/javascript" src="../build/tweetlight.min.js"></script>
<script type="text/javascript">
(function(window, document, undefined) {
Tweetlight({
username: \'pinceladasdaweb\',
container: \'.timeline\',
counter: 5
});
Tweetlight({
username: \'smashingmag\',
container: \'.timeline-profile-image\',
showImageProfile: true,
counter: 5
});
Tweetlight({
hashtag: \'#html5\',
container: \'.hashtag\',
counter: 5
});
}(window, document));
</script>
我从github repo的示例文件夹中获得了代码我试图在标题中加载一个滑块,但只在主页上加载。如果有帮助的话,我正在使用Ultralight模板。我正在尝试(在template functions.php中)执行以下操作:<?php if ( is_page( \'home\' ) ) : ?> dynamic_sidebar( \'Homepage Widget\' ); <?php endif; ?> 但这行不通。现在,通过快速的google,我似乎需要将请