bigspring / monolith

A starter theme for WordPress built with Twitter Bootstrap
MIT License
9 stars 1 forks source link

Extend Childpages shortcode arguments #221

Closed juliotaylor closed 10 years ago

juliotaylor commented 10 years ago

Allow Child Pages shortcode to use more arguments:

Parameters

Below is the full list of parameters accepted by the builder function. Note that each layout will only use some of these parameters, and in some cases the parameters will have more than one purpose.

<?php $args = array(
  'classes' => '',
  'size' => 'small-4,
  'has_image' => true,
  'has_caption' => true,
  'has_title' => true,
  'has_summary' => true,
  'has_readmore' => true,
  'has_date' => true
); ?>

classes

One or more custom classes - e.g. .primary, .rounded

size

Typically used to represent Foundation grid classes, e.g. small-4 medium-2

has_image

Controls whether a layout will display an image, typically a featured image.

has_caption

Control whether a layout will display a caption, typically a container div including a title, date, summary and that sort of thing.

has_title

Control whether a layout will display a title, typically a h2 or similar

has_summary

Control whether a layout will display a summary or excerpt (used by the snippet layout, for example)

has_readmore

Control whether a layout will display a 'Read More' permalink

has_date

Control whether a layout will display a date – used typically by snippets and blog layouts.

juliotaylor commented 10 years ago

implemented for snippets and block-grid only for now