Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何让Wordpress插件工作?_Wordpress_Plugins_Jquery Isotope - Fatal编程技术网

如何让Wordpress插件工作?

如何让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

我已经从Mintthemes安装了WordPress插件。但我不能让它工作。我已在my page.php中设置了以下代码片段,并填写了自定义帖子类型使用的可选设置

<?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标记是这样的: