Skip to content

Shortcodes

Jo Dickson edited this page May 9, 2018 · 4 revisions

The UCF Degree CPT plugin provides the following shortcodes for easily displaying degree-related information:

[career-paths]

Displays a simple list of career paths assigned to a post.

Basic Usage

To display a list of career paths assigned to the current post, simply add [career-paths] to the content of the post you'd like the list to appear on.

Options

Modify the output of the [career-paths] shortcode by passing in one or more of the following options, explained below:

Option Description Default
post_type The post type name of the post the career paths are assigned to. degree
post_slug The slug of a post object whose career paths should be fetched. null (the current post object is referenced if a unique slug isn't specified)
layout The layout to use for displaying the career paths list. Must provide the layout slug classic
title Custom heading text to display in a <h2> element above the career paths list null (no heading is displayed)

Examples

  • Display career paths assigned to the "Accounting (MSA)" degree:

    [career-paths post_slug="accounting-msa"]

  • Display career paths assigned to the current post, with a custom heading above the list:

    [career-paths title="My Career Path List"]

  • Display career paths assigned to the current post, using a custom layout ("mylayout"):

    [career-paths layout="mylayout"]


[degree-list]

TODO

Clone this wiki locally