Best Practice For Small Loops
-
Hi,
This is probably already somewhere but having a few difficulties with what exactly to call it/it’s called.
Basically I just want to know what the most efficient and therefore hopefully the ‘best practice’ would be to achieve the following:
My site is a news site and therefore has a number of categories. Most of the homepage & landing pages are made up of small loops of the, say, most recent 10 posts from a category.
So if I wanted to create a reusable ‘loop’ or ‘content node’ (name?) for say category A, B, C etc what’s the best and most efficient way? Is it a function or a specific loop-x.php page, something else?
Hard to find an example but on the Beeb (https://www.bbc.co.uk/news/) they have the ‘Business, Health, Education’ etc snippets (half-way down) I’d like to have similar that I can just call on any page I wish.
Thanks in advance for the help.
- The topic ‘Best Practice For Small Loops’ is closed to new replies.