shortcode mcc_digests

To faciltate site maintenance – the swiss army knife:

[mcc_digests section=classname parent=page title=page|none size=image_size background=page|none /]

all parameters are optional. so for example the shortcode [mcc_digests /] with no parameters on the about-2 page will generate digests for all the pages where (about-2) is the parent.

where:

  • classname
    • is used to specify a preset css formatting. the default value is ‘our-services’
  • parent=page
    • identifies the page which is the parent of the pages that are to be included in the digests
    • page is either the page number or the page name of the parent page
    • for example ‘about-2’
    • the default value is the page on which the shortcode is provided
  • title=page|none
    • if not specified, the default value ‘none’ is used.
    • none is a special keyword – simply means skip the title section
    • if a page is provided, then that page will be used to format the title section of the digest. This is similar to the way the construction_landing_page theme formats the sections of the front page.
  • size=image_size
    • image_size is on of the predefined image sizes. The default size used is mcc-service predefined to be 250px by 150px
    • for consistency between digests the featured image of each digest is resized to meet this criterion.
  • background=page|none
    • if not specified, the default value ‘none’ is used.
    • none is a special keyword – simply means no background image
    • if a page is provided, then the featured image associated with that page will be used as the background image used for the rendering the title & the digests.

A few notes about the process of rendering and the visual effects.

  • this shortcode is currently used in its simplest form on the ministries and the about page. Just he shortcode with no parameters – ie [mcc_digests /]
  • Both of these pages are defined with children.
    • in the case of ministries – the children are: Sunday Service, Kid’s Church, Alpha & Diginity. These also happen to correspond with the sub-menu items of the top level Ministries menu item.
    • in the case of About – the children are: Our Mission & Vision, What We Believe & Leadership. Again corresponding to the sub-menu items of the top level About menu item.
  • The shortcode is rendered as would be expect – with a digest for for each child, no title section and no background image.
  • Contents of a digest:
    • same content as the front page
    • featured image if there is one – resized
    • title of the page, and
    • an excerpt – a builtin wordpress concept (& function)
  • the rendering of the shortcode is done in a way that is responsive. No tedious coding is required. And the visual aspects are consistent with the chosen theme (construction_landing_page).

An example. On the about page. the shortode:

[mcc_digests /]

renders the following digests

Leave a Reply