2013-03-29 76 views
0

我已經安裝了Mintthemes的WordPress插件同位素。但我沒有得到它的工作。我在我的page.php中設置了下面的代碼片段,並且填充了自定義帖子類型使用的可選設置。如何獲得同位素Wordpress插件mintthemes工作?

<?php moveplugins_isotopes(); ?> 

新增類別,我自定義後類型的投資組合項目,但它不工作...

是有人熟悉這個插件,可以幫助我嗎?

我的代碼:

<?php moveplugins_isotopes(); ?> 

<ul class="entrybox"> 
<?php 
    $args = array('post_type' => 'portfolio'); 
    $loop = new WP_Query($args); 
?> 

<?php if ($loop->have_posts()) : while ($loop->have_posts()) : $loop->the_post(); ?> 

    <li class="grid_4 portfolio-post"> 
    <a href="<?php the_permalink(); ?>"> 
    <div class="thumbnail"> 
     <img src="<?php print IMAGES; ?>/portfolio/thumbnails/thumbnail.png" alt="Thumbnail"> 
    </div><!-- End .thumbnail --> 
    </a> 

    <div class="description"> 
     <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> 
     <?php the_excerpt(); ?> 
    </div><!-- End div.description --> 
    </li><!-- End li.grid_4 projectbox --> 

<?php endwhile; ?> 
<?php endif; ?> 
</ul><!-- End ul.entrybox --> 
+0

做你把它放在上述循環? –

+0

@DavidChase是的,我把函數放在循環上面。我將使用這個我的自定義帖子類型 - 投資組合。 – Caspert

+0

@DavidChase這是標記的樣子:http://snippi.com/s/y0qqvc9 – Caspert

回答

0

的問題是,您的李沒有使用在WordPress中post_class功能。它使用該post_class來標識循環中的哪些項目。

它應該是這樣的

<li class="<?php post_class(array('grid_4', 'portfolio-post')) ?>"> 

你可以在這裏找到更多關於它: http://codex.wordpress.org/Function_Reference/post_class