2012-04-08 13 views
0

まず、ここではコードを使用しています。コードはHTMLページでは動作しますが、Wordpressの投稿では機能しません。

<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&amp;autoplay=1">The Umbrella Trails</a></li> 
</ul> 
</ul> 
&nbsp; 
<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&amp;autoplay=1">Stagnant Day</a></li> 
</ul> 
&nbsp; 

&nbsp; 
<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&amp;autoplay=1">Job3(a) Trailer #2</a></li> 
</ul> 
&nbsp; 

&nbsp; 
<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&amp;autoplay=1">Job3(a) Trailer #3</a></li> 
</ul> 
&nbsp; 

&nbsp; 
<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&amp;autoplay=1">"The Ninja and The Fella in the Cellar"</a></li> 
</ul> 
&nbsp; 

&nbsp; 
<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&amp;autoplay=1">"Job3(a) Trailer #1"</a></li> 
</ul> 
&nbsp; 

&nbsp; 
<ul> 
    <li><img src="<?php bloginfo('template_directory'); ?>/images/opening_credits.jpg" alt="" /><a class="video" title="Opening Credits for &quot;It's Liverpool&quot;" href="http://www.youtube.com/v/6a19T8syH60?fs=1&amp;autoplay=1">"Opening Credits for "It's Liverpool""</a></li> 
</ul> 
&nbsp; 

&nbsp; 
<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&amp;autoplay=1">"It's Liverpool 1-24"</a></li> 
</ul> 
&nbsp; 

&nbsp; 
<div class="clearfix"></div> 
<a id="prev" class="prev" href="#">&lt;</a> 
<a id="next" class="next" href="#">&gt;</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ページ(speficのPHPコードを取り出す)に貼り付ける場合は、(必要なジャバスクリプトと一緒に)正常に動作します。

私はWordpressのテーマにそれを貼り付けていたら、それからビルドしようとしています。それは動作しません..

私はpage.phpファイルに直接コードを貼り付け、それが動作している間も試みました。コンテンツに簡単にアクセスする必要があるため、私が望むものではありません。

I'wordpresveはRaw-HTMLアドオンをインストールしようとしましたが、違いはありません。

私はあなたのコードでは、PHPを使用している(3.3.1)

答えて

1

をWordpressの最新のvesionを使用しています。 Wordpressは、セキュリティの理由からPHPを削除してあなたの投稿をきれいにしている必要があります。私はあなたのポストにPHPを入れることができるとは思わない。ポストでphpをサポートするにはwordpressを変更する必要がありますが、それは簡単ではありません。

+0

私は私の投稿(http://wordpress.org/extend/plugins/exec-php/)にPHPコードを入れることを可能にするexec-phpアドオンを使用しています – Keva161

+0

あなたのバージョンのワードプレス –

+1

また、 "bloginfo( 'template_directory')"を "echo 'testing'"のようなものに置き換えて出力するかどうかを確認してください。それが出力された場合は、PHPが動作していることを意味し、関数が呼び出されているという問題があります。 –

0

ショートコードを使用して、絶対パス/パスをテンプレートフォルダに書き込むショートコードを切り替えることはできますか?

関連する問題