Not showing data from Page 2

0

Hey all, I am trying to troubleshoot an issue where the items on page 2 of a certain pod listing are not being shown on the front end. Page 1 shows 15 items, then pagination takes over in the Pods listing. But any item not on Page 1 is not being shown on the front end.

Here is an image of the "page 2" I'm referring to in the Pods interface:

alt text

Here is the code I'm using on the template page: <h3>Teachers</h3> <?php edit_post_link('(edit this page)', '<p>', '</p>'); ?> <?php $team_member = new Pod('member_teacher'); $team_member->findRecords('displayorder ASC'); $total_teachers = $team_member->getTotalRows(); ?>

        <?php if( $total_teachers>0 ) : ?>
            <?php while ( $team_member->fetchRecord() ) : ?>

                <?php
                    // set variables
                    $member_name        = $team_member->get_field('name');
                    $member_lastname       = $team_member->get_field('name_last');
                    $member_title        = $team_member->get_field('title');
                    $member_image        = $team_member->get_field('image');
                    $member_email        = $team_member->get_field('email');
                    $member_site        = $team_member->get_field('website');

                    $member_image     = $member_image[0]['guid'];
                ?>
                <div class="prof_member">
                    <?php if( empty( $member_image ) ) : ?><img width="92" height="115" alt="No photo" src="http://www.stcletus.com/wp-content/themes/cletus/images/noimage.jpg" /><?php endif ?>
                    <?php if( !empty( $member_image ) ) : ?><img width="92" height="115" alt="<?php echo $member_name; ?>" src="<?php echo $member_image; ?>" /><?php endif ?>
                    <ul>
                        <li class="prof_name"><?php echo $member_name; ?> <?php echo $member_lastname; ?></li>
                        <?php if( !empty( $member_title ) ) : ?><li class="prof_title"><?php echo $member_title; ?></li><?php endif ?>
                        <?php if( !empty( $member_email ) ) : ?><li class="prof_email"><a href="mailto:<?php echo $member_email; ?>" title="<?php echo $member_email; ?>">Email me</a></li><?php endif ?>
                        <?php if( !empty( $member_site ) ) : ?><li class="prof_link"><a href="<?php echo $member_site; ?>" title="View my page">View my page</a></li><?php endif ?>
                    <ul>
                </div> <!-- close: prof_member -->
            <?php endwhile ?>
        <?php endif ?>

Again, the frontend is only loading the 15 items on Page 1; nothing on page 2. Any help is appreciated!

asked Sep 15 '10 at 4:09

jcross

0

add comment
enter at least 15 characters

2 Answers

1

Not the problem solution, but you can edit amount of fetched records (you can even turn off the limit) with the second parameter of findRecords. 15 is just default setting. You can also try using getPagination.

answered Sep 15 '10 at 4:20

Fike

208

edited Sep 15 '10 at 4:23

add comment
enter at least 15 characters
0

Thank you for the reference. I was able to solve my problem by specifying $rows_per_page to some ridiculously high number. $team_member->findRecords('displayorder ASC', $rows_per_page = 90);

answered Sep 21 '10 at 9:53

jcross

0

edited Sep 21 '10 at 9:54

add comment
enter at least 15 characters