Hy guys,
i created a dropdownlist by getting values from magic fields:
<?php $dvs = new WP_Query(); ?>
<?php $dvs->query('cat=3'); ?>
    <开发者_开发知识库;div class="dvs-menu">
        <!-- List -->
        <p>VS</p>
        <select id="dvs-list">
            <?php while($dvs->have_posts()) : $dvs->the_post(); ?>
                <option class="dvs-list" title="dvs-<?php echo get('dvs_year'); ?>" value="<?php echo get('dvs_year'); ?>">
                    <?php echo get('dvs_year'); ?>
                </option>
                <?php endwhile; // End the loop. Whew. ?>
        </select>
    </div>
I have about 20 values in there, but whatever i do, only 10 will be shown. Is that a problem of WP, MF or the browser?
I think you're hitting the standard pagination limit (10 posts per page.) Pagination is on by default (makes sense for most Loops) but obviously it's not a good option for your dropdown list.
Try adding the nopaging option to disable pagination:
<?php $dvs->query('cat=3&nopaging=1'); ?>
See the docs for more details.
                                        
                                        
                                        
                                        
                                        
                                        
                                        
                                        
 加载中,请稍侯......
      
精彩评论