首先,这是我使用的代码。
<div class="wrapper">
<div id="carousel">
<ul>
<ul>
<li><img src="<?php bloginfo('template_directory'); ?>/images/umbrella_trials.jpg" alt="" /><a class="video" title="The Umbrella Trails" href="http://www.youtube.com/v/eiBEvtNNSxg?fs=1&autoplay=1">The Umbrella Trails</a></li>
</ul>
</ul>
<ul>
<li><img src="<?php bloginfo('template_directory'); ?>/images/stagnant_day.jpg" alt="" /><a class="video" title="Stagnant Day" href="http://www.youtube.com/v/x3r5vblNAtw?fs=1&autoplay=1">Stagnant Day</a></li>
</ul>
<ul>
<li><img src="<?php bloginfo('template_directory'); ?>/images/job3a_trailer2.jpg" alt="" /><a class="video" title="Job3(a) Trailer #2" href="http://www.youtube.com/v/setjOKfzNHY?fs=1&autoplay=1">Job3(a) Trailer #2</a></li>
</ul>
<ul>
<li><img src="<?php bloginfo('template_directory'); ?>/images/job3a_trailer3.jpg" alt="" /><a class="video" title="Job3(a) Trailer #3" href="http://www.youtube.com/v/ijkEfmMNr5Q?fs=1&autoplay=1">Job3(a) Trailer #3</a></li>
</ul>
<ul>
<li><img src="<?php bloginfo('template_directory'); ?>/images/TNaTFiTC.jpg" alt="" /><a class="video" title="Fables from the Mersey - 'The Ninja and The Fella in the Cellar'" href="http://www.youtube.com/v/OdFCo1MmgTI?fs=1&autoplay=1">"The Ninja and The Fella in the Cellar"</a></li>
</ul>
<ul>
<li><img src="<?php bloginfo('template_directory'); ?>/images/job3a_trailer1.jpg" alt="" /><a class="video" title="Job3(a) Trailer #1" href="http://www.youtube.com/v/3pQUX6VkPTQ?fs=1&autoplay=1">"Job3(a) Trailer #1"</a></li>
</ul>
<ul>
<li><img src="<?php bloginfo('template_directory'); ?>/images/opening_credits.jpg" alt="" /><a class="video" title="Opening Credits for "It's Liverpool"" href="http://www.youtube.com/v/6a19T8syH60?fs=1&autoplay=1">"Opening Credits for "It's Liverpool""</a></li>
</ul>
<ul>
<li><img src="<?php bloginfo('template_directory'); ?>/images/1-24.jpg" alt="" /><a class="video" title="It's Liverpool 1-24" href="http://www.youtube.com/v/7r9N-dq1KEE?fs=1&autoplay=1">"It's Liverpool 1-24"</a></li>
</ul>
<div class="clearfix"></div>
<a id="prev" class="prev" href="#"><</a>
<a id="next" class="next" href="#">></a>
<div id="pager" class="pager"></div>
</div>
</div>
<div id="line1"></div>
<div class="paraWrapper">
<div class="span3">
<h2 class="heading">Heading</h2>
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.
<a class="btn" href="#">View details »</a>
</div>
<div class="span3">
<h2 class="heading">Heading</h2>
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.
<a class="btn" href="#">View details »</a>
</div>
<div class="social_icons span2"><a class="btn" href="#">
<em class="icon-twitter-sign icon-large"></em> Follow us on Twitter</a><a class="btn" href="#">
<em class="icon-facebook-sign icon-large"></em> Find us on Facebook</a>
<a class="btn" href="#">
<em class="icon-facetime-video icon-large"></em> Subscribe on Youtube</a>
</div>
</div>
<div id="line2"></div>
如果我将其粘贴到一个简单的 HTML 页面中(取出特定的 php 代码),它可以正常工作(以及所需的 Javascript)。
但是,如果我将其粘贴到 Wordpress 主题中,我会尝试从中构建。它不会工作..
我什至尝试将代码直接粘贴到我的page.php
文件中,虽然它确实有效。这不是我想要的,因为它需要轻松访问它的内容。
我的 wordpresve 尝试安装 Raw-HTML 插件,但没有任何区别。
我正在使用最新版本的 Wordpress (3.3.1)