如何让Wordpress插件工作?
我已经从Mintthemes安装了WordPress插件。但我不能让它工作。我已在my page.php中设置了以下代码片段,并填写了自定义帖子类型使用的可选设置如何让Wordpress插件工作?,wordpress,plugins,jquery-isotope,Wordpress,Plugins,Jquery Isotope,我已经从Mintthemes安装了WordPress插件。但我不能让它工作。我已在my page.php中设置了以下代码片段,并填写了自定义帖子类型使用的可选设置 <?php moveplugins_isotopes(); ?> 将类别添加到我的自定义帖子类型公文包项目中,但不起作用 我的代码: <?php moveplugins_isotopes(); ?> <ul class="entrybox"> <?php $args = ar
<?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 -->
-
问题在于您的li没有使用WordPress中的post_类函数。它使用post_类来标识循环中的项目
应该是这样的
<li class="<?php post_class( array('grid_4', 'portfolio-post') ) ?>">
你把它放在循环上面了吗?@DavidChase是的,我把函数放在循环上面了。我将在我的自定义文章类型-公文包中使用它。@DavidChase标记是这样的: