Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

<?php
get_header();

if (have_posts()) :
    the_post();
?>

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

<?php } ?>

<?PHP
    rewind_posts();
    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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.