Shortcodes

Project Panorama has three shortcodes for embedding content into other posts and pages, and three shortcodes to add functionality to the projects themselves.

Shortcodes for Projects

You can use shortcodes to show and hide content based on phase or milestone completion. The shortcodes that allow you to do this are:

[before-phase][/before-phase]
[during-phase][/during-phase]
[after-phase][/after-phase]
[before-milestone][/before-milestone]
[after-milestone][/after-milestone]

Simply wrap the content you want to appear in the appropriate portion within the shortcode and Panorama will automatically hide or show it depending on the phases state.

For example, if you wanted to have different content for all three phases, you might have something that looked like this:

Screen Shot 2015-09-18 at 6.44.59 PM

Embedding Content Outside of Projects

If you want to embed a project, portion of a project or list or projects into a post or page you can use one of three shortcodes.

Project List

You can display a list of all projects by using the

[project_list type="all" status="all" sort="start"]

shortcode. Project list has two options, which project types you’d like to display and the status of projects to display.

  • Type: Can be “all” or the slug of the project type you’d like to list, for example “marketing.”
  • Status: Can be “all” “active” or “complete”
  • Sort: Can be “start” which sorts projects by start date or “end” which sorts by end date
  • Order: Can be “ASC” (ascending) or “DESC” (descending).

Embed a Project

You can embed an entire project into your page or post by using the

[project_status]

shortcode. Project status has several options:

  • id: This is the page ID of the project you’d like to embed
  • progress: Do you want to display the progress bar, can be “yes” or “no”
  • overview: Do you want to show the overview? can be “yes” or “no”
  • milestones: How do you want to display the milestones? Can be “full”, “condensed” or “no”
  • phases: Do you want to display phases? Can be “yes” or “no”
  • tasks: Do you want to display tasks? (note: phases must be set to “yes”) Can be “yes”, “complete”, “incomplete” or “no”

Examples

[project_status id="792" progress="no" overview="yes" milestones="no" phases="yes" tasks="incomplete"]

[project_status id="792" progress="yes" overview="yes" milestones="full" phases="yes" tasks="complete"]

Embed a Portion of a Project

If you’d like to just embed a portion of a project, you can do by using the

[project_status_part]

shortcode in a slightly different way.

There are two attributes you must fill out:

  • id: This is the ID of the project you’d like to display
  • display: What portion of the project you’d like to display, can be:
    • documents
    • overview
    • progress (allows additional attribute of “style” with options of “full” or “condensed”)
    • phases (allows additional attribute of “style” with options of “all”, “complete”, “incomplete” or “no”
    • tasks (allows additional attribute of “style” with options “complete” or “incomplete”

Examples:

[project_status_part id="792" display="documents"]

[project_status_part id="792" display="overview"]

[project_status_part id="792" display="progress" style="full"]

[project_status_part id="792" display="phases" style="all"]

[project_status_part id="792" display="tasks" style="tasks"]

Note: We’ve tried our best to ensure shortcodes render well across a wide range of themes. It is possible that your theme may not render projects in an ideal way and CSS modifications could be required.

Updated on April 8, 2017

Was this article helpful?

Related Articles