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[0] ?>
<?php echo arr[1] ?>
<?php echo arr[2] ?>

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


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , ,

Wordpress related questions and answers: