Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.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站点的PHP网格页面_Php_Wordpress - Fatal编程技术网

编辑WordPress站点的PHP网格页面

编辑WordPress站点的PHP网格页面,php,wordpress,Php,Wordpress,我想编辑网格艺术家页面,只有12名艺术家,而不是所有艺术家的生产者部分土地 以下是网站页面的链接: PHP代码: <?php if (ci_setting('artists_isotope') == 'enabled' AND !wp_is_mobile() AND !is_tax() ): ?> <ul class="filters-nav group"> <li><a href="#filter" class="sel

我想编辑网格艺术家页面,只有12名艺术家,而不是所有艺术家的生产者部分土地

以下是网站页面的链接:

PHP代码:

<?php
if (ci_setting('artists_isotope') == 'enabled' AND !wp_is_mobile() AND !is_tax() ):
    ?>
    <ul class="filters-nav group">
        <li><a href="#filter" class="selected" data-filter="*"><?php _e('All Artists', 'ci_theme'); ?></a></li>
        <?php
            $args = array('hide_empty' => 1);
            $cats = get_terms('artist-category', $args);
        ?>
        <?php foreach ( $cats as $cat ): ?>
            <li><a href="#filter" data-filter=".<?php echo $cat->slug; ?>"><?php echo $cat->name; ?></a></li>
        <?php endforeach; ?>
    </ul>
    <?php
endif; // is isotope enabled

global $paged;
if ( ci_setting('artists_isotope') == 'enabled' AND !wp_is_mobile() AND !is_tax() ) {
    $args = array(
        'post_type' => 'cpt_artists',
        'posts_per_page' => -1
    );
}   else {
    $args = array(
        'post_type' => 'cpt_artists',
        'posts_per_page' => ci_setting('artists_per_page'),
        'paged' => $paged
    );
}

$the_query = !empty($the_query) ? $the_query : new WP_Query($args);
?>



<article class="row">
<ul class="col-md-12 items-list-grid filter-container <?php echo $filter; ?>">
    <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
        <?php $cats = wp_get_object_terms($post->ID, 'artist-category'); ?>

        <li class="<?php foreach ( $cats as $cat ) : echo $cat->slug.' '; endforeach; echo $grid;  ?>">
            <article id="artist-<?php the_ID(); ?>" <?php post_class('row'); ?>>
                <div class="col-md-12">
                    <?php if ( has_post_thumbnail() ) : ?>
                        <figure>
                            <a href="<?php the_permalink(); ?>">
                                <?php the_post_thumbnail('ci_thumb_square'); ?>
                            </a>
                        </figure>
                    <?php endif; ?>


                    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

                </div><!-- /col-md-12 -->
            </article><!-- /row -->
        </li><!-- /col-md-4 -->
    <?php endwhile; wp_reset_postdata(); ?>
</ul>

尝试更改:

'posts_per_page' => -1
致:

不确定以下变量中的“ci_设置('Artisters_per_page')”是什么,需要更多信息:

'posts_per_page' => ci_setting('artists_per_page'),

请检查分配给艺人的所有内容谢谢您的回复!我还想删除过滤器所有艺术家和到达过滤器艺术家时,我们到达艺术家部分的网站
'posts_per_page' => ci_setting('artists_per_page'),