I don’t provide the full code solution, but I will give you the direction to solve your problem.
There are two ways to solve your problem:
- Use two separated loop, the first one will have
posts_per_page
set to1
. The second one will haveoffset
set to1
. It does the job but not optimal solution. - Use only one loop with a counter:
- Set a
$counter
to1
outside thewhile
loop. - Increase
$counter
for1
at the end ofwhile
loop, so it will increase every loop inwhile
loop. - Check for current value of
$counter
before you echo the template- if
$counter = 1
, print the template for your featured post. - else? print the template for normal post (1/2 col)
- if
- You may need a wrapper for 2 column layout, you can print the opening
div
when you check for$counter = 1
, right after the featured markup. For closingdiv
, you can print it after thewhile
loop end.
- Set a
If you have any question, please let me know.