我正在尝试使用动态类别过滤器显示自定义循环。
作为设置,我有所有用户名的类别,一旦用户创建帐户,就会创建这些用户名。
所以我试图回应用户的用户名作为类别过滤器。当我在页面上的其他地方回显时它可以工作,但是当我尝试像这样嵌入它时它不起作用:
<?php query_posts('category_name=global $current_user; if ( isset($current_user) ) {echo $current_user->user_login;} &posts_per_page=10'); ?> &posts_per_page=6'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
<?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?>
<?php endwhile; else: ?>
NO Posts Present
<?php endif; ?>
任何帮助将不胜感激,谢谢。