php - Wordpress: Recent posts on homepage outside of ForEach loop? -
i'm new wordpress , can't head around displaying recent posts on homepage without being in foreach loop. creating site displays recent posts on homepage in block layout (see screenshot of static page: http://prntscr.com/etriud), except 1 of blocks intentionally larger others , why foreach loop won't work.
is there way display recent posts outside of foreach loop on page? in advance!
without seeing code, it's hard specific. if know want display first image differently rest, can still use foreach construct.
$posts = array(); $i=0; // start counter @ 0 foreach ($posts $post) { $i++; // increment counter on each loop... if ($i == 1) { // different first post.. } else { // normal stuff... } }
Comments
Post a Comment