複数の値/変数を含む文字列のエコーに問題があります。
PHPは次のとおりです。
echo '" alt="'.the_title ().'"height="500px" width="940px"data-caption="#'.$post->ID.'" />';
echo '
<span class=" orbit-caption" id="'.$post->ID.'"><a href="'.$permalink.'"><h3>'.the_title ().'</h3></a><br /><p>'.wp_trim_excerpt().'</p></span>
';
そして、これはこれ(5つのうちの1つ)になります:
<img src= "http://msc-media.co.uk/wp-content/uploads/2012/07/wpid-IMAG00421.jpgDay Thirteen – Undissapointing French castles" alt=""height="500px" width="940px"data-caption="#178" />Day Thirteen – Undissapointing French castles
<span class=" orbit-caption" id="178"><a href="http://msc-media.co.uk/?p=178"><h3></h3></a><br /><p>We finally decided to take advantage our free entry to Peyrepetouse, the pictures say it all really! Was super windy near the top, so much so that the falconry show in the castle lost a few birds, which we watched fight the wind to try to get back to their masters for over 30 minutes, [...]</p></span>
これに関する問題は、.the_title()です。alt = ""タグには表示されませんが、前にimgsrcとマージされます。2番目の問題は、span orbit-captionの場合、タグの間に表示されるはずのthe_title()が出力されないことです。
どこが間違っているのか教えてください。-または、この文字列をより多くのエコーに分割する必要がありますか?