Skip to content

serranoabq/ctc-shortcodes

Repository files navigation

CTC Shortcodes (Plugin)

A WordPress plugin that used to display Church Theme Content Plugin content using shortcodes.

Description

CTC Shortcodes is a a plugin for a plugin. It is designed to allow users of the Church Theme Content Plugin to display some of the content stored by the CTC plugin from within their posts and pages, even if the theme isn't CTC-compatible.

Installation

Please see Installing Plugins in the WordPress Codex for general installation instructions.

CTC Shortcodes requires the Church Theme Content Plugin as well, so make sure it is also installed. A compatible theme isn't required, but is recommended. To create a compatible theme, please see the CTC Developer Guide.

Usage

The plugin makes available several shortcodes to expose and display the content associated with the CTC plugin. There are basically four sets of shortcodes: type archives, taxonomy archives, taxonomy lists, and single posts. Type archives are a listing of all posts of a given type, including their associated meta data. Taxonomy archives are a listing of all posts of a given taxonomy. Taxonomy lists are a listing of all available taxonomies. Single posts are a way of including a single post of a given type.

Type archives

[ctc_people]
[ctc_events]
[ctc_sermons]
[ctc_locations]

Taxonomy archive

[ctc_group name='']
[ctc_topic name='']
[ctc_tag name='']
[ctc_series name='']
[ctc_speaker name='']
[ctc_book name='']

Taxonomy lists

[ctc_groups]
[ctc_speakers]
[ctc_books]
[ctc_tags]
[ctc_topics]
[ctc_series_list]

Single post

[ctc_event name=''|id='']
[ctc_sermon name=''|id='']
[ctc_location name=''|id='']
[ctc_person name=''|id='']

###Options###

Parameter Definition
before/after Text to prepend and/or append to the output. Default: ''
count Number of items to display for the list and archives. If specified, the display will allow pagination. Default: all
thumb_size String specifying the size of the image to display. Typical values include thumbnail, large, medium, small. However, a theme can also define other size names. Default: thumbnail
link_title Boolean flag specifying whether the title of an item should link to its page. Default: false.
name For taxonomy archive, it is the slug name of the taxonomy term to display. For single post shortcodes, it is the slug name of the post to display, and either this or 'id' must be specified. Defautl: ''
id For single post shortcodes only. Post ID of the post to display. Either this or 'name' must be specified. Default: ''

###Templates:### TBD

Notes

  1. CTC Shortcodes only handles the information display, not the backend related to the custom post types created by the CTC plugin. To request features related to the CTC plugin, go to the support page for the CTC Plugin.
  2. I have created a fork of the CTC plugin which adds additional features, such as daily recurrence and Nth day/week/month/year recurrence, and taxonomy images to the CTC Plugin. You can find it on GitHub. Note that this is an unsupported fork. Steven Gliebe and ChurchThemes.com are not associated with this fork.
  3. Pagination is supported but gets complicated especially if there are multiple shortcodes on the page, all of which need pagination (which page goes with what?)
  4. The link_title flag works best if the theme is designed to support the Church Theme Content plugin (i.e., with an appropriate post type template and add_theme_support( 'church-theme-content')). Otherwise, the title link would be to a blank page which lacks the ability to display the meta data associated with the various post types.
  5. The display is controlled by template files. An example of these is located in the ctc-shortcodes-inc directory within the plugin directory. These templates can also be included in the current theme. As with theme template parts, the plugin will look in the child theme, parent theme and its own directory for a template, in that order.

Changelog

  • 0.1 - Initial version
  • 1.0 - Fairly complete version
  • 1.0.1 - Add support for custom styles

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors