orion35 adlı üyeden alıntı: mesajı görüntüle
Asagidaki sekilde kullanabilirsin.
$istenmeyen_uyeler = array(4, 13, 54); buradaki uye id'leri kendine gore degistir.

/* = Yazarlar
-------------------------------------------------------------- */
add_shortcode( 'yazarlar_slider', 'yazarlar_slider_func' );

/* $yazarlar_slider_title = ''; */

$istenmeyen_uyeler = array(4, 13, 54);

function yazarlar_slider_func( $atts, $content = null ) {
ob_start();
/* extract(shortcode_atts(array(
'yazarlar_slider_title' => '',
), $atts)); */
$output ='';
?>

<div id="yazarlar-section" data-aos="fade-zoom-in" data-aos-anchor-placement="top-bottom" data-aos-duration="500">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="sliderYazarlar-cont">
<div class="swiper-container yazarlar-container">
<div class="swiper-wrapper">

<?php
$authors= get_users('role=author');
$i=0;
//get all users list
foreach($authors as $author){
$authorList[$i]['id']=$author->data->ID;
$authorList[$i]['name']=$author->data->display_name;
$i++;
}
?>

<?php
foreach($authorList as $author){
$args=array(
'showposts'=>1,
'author'=>$author['id'],
'ignore_sticky_posts'=>1
//'tag' => 'yazarlar-anasayfa',
);
$query = new WP_Query($args);
if($query->have_posts() ) {
while ($query->have_posts()){
$query->the_post();

$author_id = $author['id'];

if( !in_array($author_id, $istenmeyen_uyeler) ){
?>

<div class="swiper-slide">
<div class="yazar-item">
<?php
$get_author_gravatar = get_avatar_url($author_id); ?>
<a href="<?php echo get_author_posts_url($author_id); ?>"><?php echo '<img src="'.$get_author_gravatar.'" />'; ?></a>
<h3><a href="<?php echo get_author_posts_url($author_id); ?>"><?php echo $author['name']; ?></a></h3>
<p><a href="<?php echo get_permalink( $query->ID ); ?>"><?php echo get_the_title( $query->ID ); ?></a></p>
<a href="<?php echo get_author_posts_url($author_id); ?>" class="link-general">Tüm Yazıları</a>
</div>
</div>

<?php
}
}
wp_reset_postdata();
}
}
?>

</div>
</div>
<!-- Add Arrows -->
<div class="button-next button-next-yazarlar"></div>
<div class="button-prev button-prev-yazarlar"></div>
</div>
</div>
</div>
</div>
</div>
<?php
$output .= ob_get_clean();
return $output;
}
Hocam çok teşekkürler ama herhangi bir değişiklik olmadı. Gizlemek istediğim kullanıcıların ID'sini giriyorum yine de görüntülemeye devam ediyor.