WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have code like below (I removed all the uneeded HTML and stuff for this post). The code is for my author.php page.

So it shows some author data at the top of the page then runs rewind_post() so it can show the post's by that user.

The problem is for the admin, it is showing all the menu items as post in this loop/list


if (have_posts()) :

    View my website:<a href="<?php the_author_meta('user_url'); ?>"></a>

<?php } ?>

    while (have_posts()) : the_post();

        $format = get_post_format();
        if ( false === $format ){
            $format = 'standard';
        get_template_part( 'format', $format );

    endwhile; /* rewind or continue if all posts have been fetched */ ?>

<?php get_sidebar(); ?>
<?php get_footer(); ?>

And the file included in the get_template_part is simply the basic stuff like <?php the_content(__( 'read more...', 'vigilance' )); ?>

share|improve this question
I found the answer, it wont let me answer for 8 hours though – JasonDavis Dec 30 '11 at 11:12
up vote 0 down vote accepted

I found the problem, this function was causing the problem....

function include_custom_post_types( $query ) {
$custom_post_type = get_query_var( 'post_type' );
    if ( is_archive() ) {
    if ( empty( $custom_post_type ) ) $query->set( 'post_type' , get_post_types() );
if ( is_search() ) {
    if ( empty( $custom_post_type ) ) {
        $query->set( 'post_type' , array(
            'post', 'page', 'website_bookmarks'));
return $query;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.