Results 1 to 4 of 4

Thread: Query only returning 1 result? Wordpress 3.0

  1. #1
    Mild Fuzz is offline Here For The Peanuts
    Join Date
    Feb 2010
    Posts
    106

    Default Query only returning 1 result? Wordpress 3.0

    :Edit - Resolved: See 4th Post :

    I can't seem to figure out why this simple query is only returning one result. There are definitely more. I am using the custom post type, sorted by custom taxonomy in wordpress 3.0


    Here is the page:

    PHP Code:
    <?php
    /*
    Template Name: Teachers
    */
    get_header(); ?>

        <div id="content">
        <?php 
        $teacher_query 
    = new WP_Query('post_type=Teachers&status=Permanent&orderby=menu_order');
        

            if (
    $teacher_query->have_posts()) : while ($teacher_query->have_posts()) : $teacher_query->the_post(); ?>



                <div class="post teacher">
                    <div class="teacher-thumb">
                        <?php mf_post_thumbnail();?>
                    </div>
                    <h2><?php the_title(); ?></h2>
                    
                    <div class="entry">
                        <?php the_content(); ?>
                    </div>
                </div>




            <?php endwhile; else: ?>

                <p>Currently, no teacher profiles have been uploaded.</p>

        <?php endif; ?>

    </div>
    <?php get_footer(); ?>
    I am hoping this is just tired eyes!!
    Last edited by Mild Fuzz; 06-13-2010 at 02:05 PM.

  2. #2
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,801

    Default

    Do you have the same problem if you change to the "post" post-type?

  3. #3
    Mild Fuzz is offline Here For The Peanuts
    Join Date
    Feb 2010
    Posts
    106

    Default

    Yeah, still only 1 post. 5 in the database.

    and 3 teachers.

  4. #4
    Mild Fuzz is offline Here For The Peanuts
    Join Date
    Feb 2010
    Posts
    106

    Default

    Sorry to anyone who's wasted their lifes reading that code. Post count in admin settings set to 1. Tired eyes, tired eyes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •