フォーラム

[解決済み] 最新の記事の投稿画像の一覧を表示 (3 件の投稿)

  1. tanpopo2
    メンバー
    1 ヶ月前の投稿 #

    タイトルの通りなのですがトップページに一覧で表示させたいのです。
    以下の様な物を検索で見つけて設置しましたが上手に出来ませんでした。
    Parse error: syntax error, unexpected '=' が出ます。
    お手すきの方、ご教授お願い致します。

    <?php query_posts(’showposts=3′);
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    $files = get_children(”post_parent=$id&post_type=attachment&post_mime_type=image”);
    if (!empty($files)){
    $keys = array_keys($files);
    $num=$keys[0];
    $thumb=wp_get_attachment_thumb_url($num);
    print ‘<a href=”‘ . clean_url(get_permalink()) . ‘” title=”‘ .the_title_attribute(’echo=0′) . ‘”><img src=”‘ . clean_url($thumb) .’” width=”80″ height=”80″ alt=”‘ . the_title_attribute(’echo=0′) . ‘” /></a>’ . “\n”;
    }
    endwhile;else:
    endif;
    ?>
  2. tanpopo2
    メンバー
    1 ヶ月前の投稿 #

    自己解決?しました。
    クライアントに納得頂いて、表示させない事にしました。
    有難う御座いました。

  3. shokun0803
    メンバー
    1 ヶ月前の投稿 #

    コピペのミスでなければ全角半角が大量に混ざっているような気がするのですが・・・?
    まあ、自己解決なのでいいのですかね;)

返信

ログイン しなければ投稿できません。

About this Topic

Tags

タグ はまだありません。