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

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -