Trimming my DB calls — how to?
-
I have a page that makes 47 calls to the database, which makes the page pretty slow to draw. I would like to trim that down with some more efficient code you can see the page here.
There are three different spots where the following code is (for station news, programmer’s notes, and podcasts):
<?php $posts = get_posts('numberposts=7&category=225'); foreach($posts as $post) : setup_postdata($post); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2> </div><!-- CLOSE post --> <?php endforeach; ?>
Is this where I can be more effiecent? Otherwise, does anybody have ideas to make the page load quicker?
In advance, thanks for your help.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Trimming my DB calls — how to?’ is closed to new replies.