ユーザー紹介ページ(author.php)について
-
ユーザー紹介ページで寄稿者が一覧表示されれるようになっています。
寄稿者のみを表示したいのですが、管理者も表示されてしまいます。
管理者を表示させないようにするにはどうすればいいでしょうか?下記が記述しているコードです。
author-list.php
// Import require functions require_once(DP_THEME_DIR . "/inc/scr/get_author_info.php"); <div class="archive-title-sec author authors-list"> <ul class="authors_list<?php echo $col_class; ?>"> <?php // Params $args = array('return_array'=> true, 'is_microdata' => false, 'avatar_size' => 300); foreach ( $query as $q ) : $args['user_id'] = $q->ID; $arr_author = dp_get_author_info($args); $author_code = $arr_author['profile_img'].$arr_author['author_role'].'<a href="'.$arr_author['author_posts_url'].'">'.$arr_author['author_name'].'</a>'; ?> <li class="author_item clearfix"><?php echo $author_code; ?></li> <?php endforeach; ?> </ul> </div>
get_author_info.php
function dp_get_author_posts() { global $post, $options, $options_visual, $COLUMN_NUM, $IS_MOBILE_DP; if (post_password_required()) return; $post_num = 4; $width = 400; $height = 320; $cats = ''; $cats_code = ''; $more_code = ''; $articles_code = ''; // Params $args = array( 'author'=> ('ID'), 'numberposts'=> $post_num, 'exclude'=> $post->ID ); // Get posts $articles = get_posts($args); }
アドバイスをお願いいたします。
2件の返信を表示中 - 1 - 2件目 (全2件中)
2件の返信を表示中 - 1 - 2件目 (全2件中)
- トピック「ユーザー紹介ページ(author.php)について」には新たに返信することはできません。