Skip to content

The Builder

simonpmiles edited this page Jan 16, 2017 · 5 revisions

Monolith ships with a few functions to make content loops easier.

<?php
  monolith_grid( 'card', //part
  'large-up-1', // size
array( // builder args
  'has_image'    => true,
  'has_summary'  => true,
  'has_title' => true
),
array ( // wp_query_args
  'post_type'      => 'post',
  'posts_per_page' => 2
)
);
?>

<?php monolith_build( array('layout' => 'snippets', 'part' => 'snippet') ); ?>
<?php monolith_grid( 'snippet'); ?>
<?php monolith_accordion(); ?>
<?php monolith_list(); ?>
<?php monolith_tabs(); ?>

Clone this wiki locally