0
我使用下面的代碼來創建一個鏈接到下一篇文章,這裏$hidden_categories
是包含我想從一個鏈接排除類別的ID的數組。excluded_categories不get_next_post工作()
<?php
$next_post = get_next_post(false, implode (", ", $hidden_categories));
if (!empty($next_post)): ?>
<a href="<?php echo get_permalink($next_post->ID); ?>"><?php echo $next_post->post_title; ?></a>
<?php endif; ?>
但它不排除我想排除的類別的職位。這段代碼有什麼問題嗎?