Statistical Value Conveyed
Paramount for site visitors, statistics aid in reinforcing content and value with factual evidence. The BU Stats plug-in for CDS, provides a way to conveniently add, manage and display of a variety of statistics (some animated) in flexible ways using a WordPress post type.
BU Stats can be used to inform and showcase the benefit of a value proposition in the context of a landing page, and present data from a project or initiative in the context of a default page template.
The documentation here is an overview of the plugin with contextual demonstration within the CDS theme. Additional, specific documentation for the plugin itself can be found here.
Each post-type-based statistic consists of input fields such as:
- Post Title — A field for entering a clear, summarizing title near the top for the Statistic post. This Post Title will help in referencing and sourcing among All Statistics in the WordPress Admin.
Statistic Type — The type of statistic to be rendered. See “Stat Types” below. - Theme — The theme a statistic should take the general appearance of. See “Stat Themes” below.
- Title — An input field for rendering text before the statistic Value and to provide a title. This field is commonly seen as optional and dependent on the presentation of a stat.
- Value — Depending on the Statistic Type chosen, this field will render a few input fields and/or drop-downs. A fantastic feature of this statistic part is that the primary value can be prefixed† or suffixed* with a variety of select symbols, abbreviated numerical values, and even units of measure.
- Description — A brief summary of the statistical value can be conveyed in this description field.
- Image — An appropriate, representative background image that won't steal the focus of the Stat value can be included from the Media Library with this field.
†Prefixed symbols include: “+ – $ # = TOP”
†Suffixed symbols include: “% %+ + – $ # K K+ M M+ B B+ st nd rd th ft in mm cm m km yd mi sq ft lb oz mg g kg T ml gal”
Stat Types
The types of statistics available (as referenced in the image above) include:
- Number (ex: “#1, rank among colleges”)
- Animated Percentage (ex: “80%, average success rate” [with an animated circle demonstrating the percentage])
- Text (ex: “Fifteen, Average class size to know your professors better.”)
- Dual Value (ex: “Top 95 of 100% programs for learning.”)
Stat Themes
Statistic posts come with a dropdown selection for designating a theme for a stat. Presently, there are two options available and each theme adjusts the colors and contrast, depending on which is chosen:
- Default Theme, for standard text to offset lighter backgrounds.
- Dark Theme, for lighter text to offset darker backgrounds.
Managing BU Stats in The Admin
Activating The Plug-In / Accessing, Adding & Managing Statistic Posts
From the WordPress Admin dashboard for the theme, click on the Plugins section in the sidebar to the left.
On the Plugins page: Scroll till you come across BU Stats in the listing.
Click on Activate. The page should refresh confirming that the BU Stats plugin is activated.
To access a dedicated area for managing posts of the plugin: click on the newly created "Statistics" section in the sidebar to the left. (Note: this link only works once plugin is activated.)
All created Statistic posts are available for quick adding, editing and removing from this Statistics section.
Add a Stat In The Admin
- To create a new statistic post, simply click on "Add New".
- Upon adding a new statistic: enter in a clear title (for admin reference) and begin by selecting the desired Statistic Type(as referenced at top of this article).
Edit a Stat While Previewing a Page
While logged in to your WordPress theme and previewing or visiting a page — a small link (“Edit Stat”) will render in the top right corner of each statistic. Clicking this navigates to an admin view of the post for editing the statistic information.
Adding BU Stats to Site Pages
BU Landing Pages
Upon activating it's plugin, a re-order-able BU Stats section becomes accessible from any BU Landing Page Template — for which different stats can be attached on a per page basis. Gathering statistics in a section such as this is helpful for reinforcing the value a Landing Page discusses.
This new BU Landing Page section provides fields for:
- Section Title,
- Section Description,
- 2-column space for Statistics post selection (Available Statistics in the left column, Attached Statistics in the right column).
- (unadvised to add and also optional) View All Statistics field for entering a link, if a page has been created for showing an archive statistics (not recommended for this theme at this time).
- (optional) Statistics Space [CSS] Class(es) — for entering in any CSS classes with custom styles, such as
spark
for BU Spark!
Default, Content Pages
On more traditional default content page template, a shortcode is used to add Statistic posts of the BU Stats plugin and is helpful in reinforcing value and facts of the organization and of any projects featured.
[bu_stat ids="80,2312,2313" align="center" theme="default"]
The shortcode consists of [bu_stat
and three other parameters which are enclosed by a ]
These parameters (and their options) include:
ids=
(a comma-separated(no spaces) list of id number(s) of Statistic post(s) that have been added to the site(see above) from the admin°.)align=
(for alignment of the Statistic post(s) included on a page:"left"
"center"
and"right"
are available for use)theme=
(at this time, input either"default"
or"dark"
)
° Post id
numbers are usually found at the end of a URL of a post, typically viewed from within the admin of your theme. For example: a post id of 80
would serve up a statistic post from an [example]URL such https://www.bu.edu/cds-faculty/wp-admin/post.php?post=80&action=edit
. Content that's a part of that Statistic Post will be rendered in a shortcode when its id
number of 80
is input.
BU Spark! Stats
For the BU Spark! organization special styles can be applied to groups of stats when the spark
class is included, either in the Statistics Space Class(es) of the BU Stats section of a BU Landing Page OR if a default content page template is designated BU Spark! using the departments taxonomy.