Suppose I am developing a minimal theme, the the post page
single.php displays only the post title, the excerpt and the content.
So in general that would be
<?php the_title(); ?> <?php the_excerpt(); ?> <?php the_content(); ?>
So I am expecting 3 queries…
Instead if I write a custom query where I am just fetching these 3 datas in an array at once…
<?php arr = select title, excerpt, content from wp_posts where post_id = 1; ?> <?php echo arr ?> <?php echo arr ?> <?php echo arr ?>
Which is faster or does it make a difference ?
Plz ignore syntax if wrong…
Read more here: Which is better and faster ? WordPress Queries or SQL Query