什么wordpress插件会起诉我的需求?

时间:2013-12-19 10:34:45

标签: wordpress plugins

你好伙伴stackoverflowers,

我对wordpress非常困惑,我正尽力去理解一切。

我需要的是一个插件,可以让我的帖子看起来像投资组合页面上有图像,所以它就像这样:

Title1
____________________________
|Text Text Text|Image Image|
|Text Text Text|Image Image|
|Text Text Text|Image Image|
----------------------------
Title2
____________________________
|Text Text Text|Image Image|
|Text Text Text|Image Image|
|Text Text Text|Image Image|
----------------------------

我也在基于WP的论坛上问过这个问题,但实际上没有人可以帮助我。

我需要它,因为我几乎没有任何网站没有经验的朋友,我想让他们更轻松地发布我们的投资组合工作。

提前致谢

1 个答案:

答案 0 :(得分:0)

尝试将以下代码放入您的文件中:

<?php while ( have_posts() ) : the_post();  ?>
                      <h1 class="entry-title">
                            <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
                    </h1>
                    <div class="entry-content">
    <?php the_content( ); ?>
                        <?php $attachments = get_posts( array(
        'post_type' => 'attachment',
        'posts_per_page' => -1,
        'post_parent' => $post->ID,
        'exclude'     => get_post_thumbnail_id()
    ) ); 
 ?><div id="posts">
<ul><?php
    if ( $attachments ) {
        foreach ( $attachments as $attachment ) {                 
               $thumbimg = wp_get_attachment_link( $attachment->ID, 'thumbnail-size', true );
            echo '<li class="thumbnail">' . $thumbimg . '</li>';
        }        
    }
  ?>    </ul>
 </div>
                    </div>
        <?php endwhile; ?>