2011-12-28 11 views
0

私はカスタムWordPressページのテンションを作成しています。私はWordPressのウェブサイトのガイドラインに沿ってページテンプレートを作成してアップロードしましたが、私は問題があります:イメージが読み込まれていません。ウェブサイトに画像が表示されない

私は画像を正しく配置したと確信しています。 Hereは私のサイトです。

ロックウェル(テーマ名)のディレクトリにあるすべての画像を含むPk_filesがありますが、画像はロードされていません。何か案が?ここで

が私のコードで、

<?php 
/* 
Template Name: Packages 
*/ 
?> 
<?php get_header(); ?> 
<html><head> 
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><style type="text/css"> 
#index_contentbg { 
    clear: both; 
    padding: 10px 35px 15px; 
    width: 890px; 
    font-family: 'Trykker', serif; 
} 

#video_blue_box { 
    background: url("http://www.99centarticles.com/css/../images/vbb_bg.jpg") repeat-x scroll 0 0 transparent; 
    clear: both; 
    height: auto; 
    padding: 10px 35px 15px; 
    width: 890px; 
    text-align:center; 
    font-family: 'Trykker', serif; 
} 
</style> 
<link href="Pk_files/css.css" rel="stylesheet" type="text/css"> 


</head><body><div id="video_blue_box"> 
<h2>Our Packages</h2></div> 

<div id="index_contentbg"> 
<p>Below are our package deals, order now and get <strong>20% Extra.</strong></p> 
</div> 



<div id="video_blue_box"> 
<h2>500 Word Article Writing Package</h2> 
</div> 
<div id="index_contentbg"><img src="Pk_files/firsty.PNG" height="525" width="347"></div> 
<div id="video_blue_box"> 
<h2>Quality Article Writing + Our Signature Submission Method</h2> 
</div> 
<div id="index_contentbg"> 
    <p><img src="Pk_files/1.PNG" align="absmiddle" height="539" width="341"></p> 
</div> 

<div id="video_blue_box"> 
<h2>Custom Articles - You Choose Word Count and Quantity</h2> 
</div> 
<div id="index_contentbg">Please contact us through or contact form for the quote.</div> 

<div id="video_blue_box"> 
<h2>Press Release Writing</h2> 
</div> 
<div id="index_contentbg"> 
    <p><img src="Pk_files/5.PNG" height="428" width="351"></p> 
</div> 


<div id="video_blue_box"> 
<h2>Press Release Writing + Our Signature Submission Method</h2> 
</div> 
<div id="index_contentbg"> 
    <p><img src="Pk_files/6_1.PNG" alt="" height="393" width="824"></p> 
    <p><img src="Pk_files/6_2.PNG" height="390" width="804"></p> 
    <p><img src="Pk_files/6_3.PNG" height="388" width="794"></p> 
    <p>&nbsp;</p> 
    <p>&nbsp;</p> 
</div> 


<div id="video_blue_box"> 
<h2>Drive Traffic Marketing Videos</h2> 
</div> 
<div id="index_contentbg"><img src="Pk_files/7_1.PNG" height="292" width="339"></div> 
<div id="video_blue_box"> 
    <h2>Premium Website/Sales Page Videos</h2> 
</div> 
<div id="index_contentbg">Please contact us through or contact form for the quote.</div> 
<div id="video_blue_box"> 
<h2>Custom Facebook Fan Page</h2> 
</div> 
<div id="index_contentbg"> 
    <p><img src="Pk_files/7_2.PNG" height="288" width="343"></p> 
</div> 
<div id="video_blue_box"> 
    <h2>Custom Sales Page</h2> 
</div> 
<div id="index_contentbg"> 
    <p>&nbsp;</p> 
<img src="Pk_files/8_1.PNG" height="221" width="342"></div> 
<div id="video_blue_box"> 
<h2>Custom Blog Design/Wordpress Theme</h2> 
</div> 
<div id="index_contentbg">Please contact us through or contact form for the quote.</div> 
<div id="video_blue_box"> 
<h2>Custom Facebook Fanpage</h2> 
</div> 
<div id="index_contentbg"><img src="Pk_files/9.PNG" height="98" width="342"></div> 
<div id="video_blue_box"> 
<h2>Link Building Service</h2> 
<p>&nbsp;</p> 
</div> 
<div id="index_contentbg"><img src="Pk_files/11.PNG" height="84" width="336"></div> 
<div id="video_blue_box"> 
<h2>Blog Commenting SEO Service</h2> 
</div> 
<div id="index_contentbg"> 
    <p><img src="Pk_files/12.PNG" height="346" width="344"></p> 
</div> 
<div id="video_blue_box"> 
<h2>.EDU Linking SEO Service</h2> 
</div> 
<div id="index_contentbg"><img src="Pk_files/13.PNG" height="285" width="346"></div> 
<?php get_footer(); ?> 
+0

テーマのすべての画像が壊れているのか、このテンプレートの画像だけが壊れていますか?問題のデバッグに役立つコードをここで共有することができます。ブラウザでエラーが発生していますか?また、画像のURLをチェックして、正しいパスを指しているかどうかを確認します。 – calvinf

答えて

4

マイブラウザのコンソールは、このようなURLのための404件のメッセージがいっぱいです:

http://bestseoarticlewriters.com/121-2/Pk_files/6_3.PNG 

最も可能性のある説明は、あなたのテンプレートに相対パスを使用したことです。相対パスは、現在のページに関連して、HTMLが来ている実際のテンプレートパスではなく、常に解決されます。 (唯一の例外は、そのパス常にCSSファイルへの相対解決れるCSSファイルのためのものです)

使用絶対URL、またはより好ましくは、使用WordPressのbloginfo():標準的な方法です

<img src="<?php bloginfo('template_directory'); ?>/Pk_files/6_3.PNG"> 

テンプレート内の画像にアドレス指定する。

0

ちょっとした注意 - urlのparemetersのあるbloginfoは非推奨(または少なくとも推奨されません)で、get_template_directory_uriなどの関数の使用が必須です。

関連する問題