0

抜粋の「続きを読む」リンクにカスタム画像を出力しようとしています。

そのようです...

ここに画像の説明を入力

私のニーズに合わせてカスタマイズできるので、高度な exceprt プラグインを使用しています。

これは、readmoreリンクの画像で抜粋を出力しようとした方法です...

<?php the_advanced_excerpt('length=120&use_words=0&no_custom=0&ellipsis=%26hellip;&read_more=read more <img src"' . get_bloginfo('template_url') . '"/images/readmore-arrow.png" alt="" />&add_link=1'); ?>


しかし、奇妙なことに、このreadmoreリンクを出力します...

ここに画像の説明を入力

画像の場所のURLをバラバラにしてこんな風に出力するらしい…

<img alt="" readmore-arrow.png"="" images="" my-theme-name"="" themes="" wp-content="" wp="" mywebsitename.co.uk="" src"http:="">


これを修正するのを手伝ってくれる人はいますか?

ありがとう




作業コード...

<?php the_advanced_excerpt('length=120&use_words=0&no_custom=0&ellipsis=%26hellip;&rea‌​d_more=read more <img src="' . get_bloginfo('template_url') . '/images/readmore-arrow.png" alt="" />&add_link=1'); ?>
4

1 に答える 1

0

私はそのプラグインを使用していないので、これで修正されるかどうかはわかりませんが=src属性の がありません。ここに追加しました:

<?php the_advanced_excerpt('length=120&use_words=0&no_custom=0&ellipsis=%26hellip;&read_more=read more <img src="' . get_bloginfo('template_url') . '"/images/readmore-arrow.png" alt="" />&add_link=1'); ?>
于 2012-04-12T11:16:17.943 に答える