Two loops on index.php with two content templates?
-
Hi,
I am currently redisigning my custom theme and I have put two loops on the index.php file.
The first loop gets only sticky posts so I can have a featured posts section. In this loop I get content-featured.php which has only the html and php code for displaying the sticky posts.
My second loop gets all the posts but excludes sticky posts so no duplicate posts. In this loops I get the content.php template.
My question is, is this the correct way to go about this? having two loops and two templates? I want the theme to conform to wordpress standards and I wasnt sure if maybe I was doing it the hard way.
Any theme dev pros, is there an easier way to have a featured posts section?
It seems to working OK so far mind you.
- The topic ‘Two loops on index.php with two content templates?’ is closed to new replies.