Popular Shortcodes

Important Note: When using shortcodes, there should not be a space after the first bracket and the element name. The spaces used in the examples below are for display purposes only.

If you are copying and pasting any of the code below, make sure you delete the extra space after the first bracket. You also may want to check out the glossary below.


Foldaway

This shortcode allows you to hide content inside of a container folded away from visibility. Additionally, you are able to use any of the header (H1, H2, H3, H4, H5, H6) elements to style the title of the section.

[ foldaway heading="The Section Title" level="4"]
Add your content to be folded away in this space between the brackets.
[/foldaway]
Attributes for foldaway

style – changes the default yellow background to transparent.

[ foldaway heading="The Section Title" level="4" style="transparent"]
Add your content to be folded away in this space between the brackets.
[/foldaway]
+Example with default yellow

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas quis nisi vitae leo pellentesque efficitur. Duis lobortis sit amet justo eget aliquet. Sed quis quam commodo, auctor libero eget, fringilla mi. Morbi dignissim massa tempus, venenatis libero sed, molestie nulla. In hac habitasse platea dictumst. Nullam tristique diam at eros blandit condimentum. Proin ultricies id tellus id vulputate. Etiam lacus quam, dapibus ut nisl quis, egestas egestas lacus. Mauris sed velit ex. Vestibulum ultricies mauris a iaculis vestibulum. Duis et tempor felis, id efficitur justo. Maecenas sodales dignissim laoreet.

 

+Example with transparent background

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas quis nisi vitae leo pellentesque efficitur. Duis lobortis sit amet justo eget aliquet. Sed quis quam commodo, auctor libero eget, fringilla mi. Morbi dignissim massa tempus, venenatis libero sed, molestie nulla. In hac habitasse platea dictumst. Nullam tristique diam at eros blandit condimentum. Proin ultricies id tellus id vulputate. Etiam lacus quam, dapibus ut nisl quis, egestas egestas lacus. Mauris sed velit ex. Vestibulum ultricies mauris a iaculis vestibulum. Duis et tempor felis, id efficitur justo. Maecenas sodales dignissim laoreet.

 


 

Collapsible Areas

This shortcode gives you a clickable title bar with a section of content that slides out below. You can also link directly to the opened bar. To get that link, click the bar first and then copy the url from your browser address bar.

  • ttl – displays the title in the colored bar.
  • start – (optional) set this to “open” to make this section opened initially upon page load.
  • color – (optional) allows for the customization of the background color of the bar. Accepts any html color value. For example, if you wanted the title bar of the collapsible area to be Garnet, use: color=”#851326″ within the first bracket after the title.
[ btn ttl="The Title Bar"]Lorem ipsum...[/btn]

You can create a link to open every collapsible area on the page by giving it the id “open-all-btns” like <a href=”#” id=”open-all-btns”>Click<a>

The Title Bar

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris porttitor eget tortor vel pulvinar. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce at faucibus eros. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam nisl sem, cursus non viverra quis, venenatis vitae dui. 

Highlight Boxes

Highlight/callout content by putting a box around.

Attributes

  • color – (optional) choose what color the box should be. By default it’s yellow, but you can also choose pinkgreen, and blue.
[ highlight]Example one[/highlight]
[ highlight color="green"]Another example, this one green![/highlight]

Example one

Another example, this one green!


Call to Action Button

An inviting clickable button. This has a lot of options, but only the link is required.

Attributes

link – the url to send the user to.

type – Specify a type of button to display. See the all options+ full-button, large-button

target – (optional) Whether the link should open in a new page. To make the link open a new page, use target=”blank”.

style – Specify a varity of colors and arrows for the button. See the all options+ gray-button, blue-button, aqua-button, dark-button, white-button, with-arrow

[ cta link="https://www.bates.edu"]Default Button[/cta]
[ cta link="https://www.bates.edu" type="large-button"]Large Button[/cta]
[ cta link="https://www.bates.edu" type="full-button"]Full Width Button[/cta]
[ cta link="https://www.bates.edu" type="large-button full-button"]Large and Full Width Button[/cta]
[ cta link="https://www.bates.edu" style="gray-button"]Gray Button[/cta]
[ cta link="https://www.bates.edu" style="blue-button"]Blue Button[/cta]
[ cta link="https://www.bates.edu" style="aqua-button"]Aqua Button[/cta]
[ cta link="https://www.bates.edu" style="dark-button"]Dark Button[/cta]
[ cta link="https://www.bates.edu" style="white-button"]White Button[/cta]
[ cta link="https://www.bates.edu" style="with-arrow"]Button with arrow[/cta]
[ cta link="https://www.bates.edu" style="blue-button with-arrow"]Blue Button with arrow[/cta]

 

This is an enhancement of the normal WordPress gallery. In order to use these, first create a gallery using the standard WordPress methods, then add these attributes to the generated shortcode (the gallery shortcode will only be visible in the text tab of your page editor.

Attributes
  • Tiled gallery: To disable the slideshow and display a regular WordPress tiled gallery, use slideshow=”false” in the shortcode.
  • Transition effects: To use a left/right scrolling effect, use effect=”scroll” (defaults to a fade effect).
  • Bookmarkable slides/images: Give the ability to link to an individual slide by adding bookmarks=”true”.
  • Disable captions: Turn off captions with captions=”false”.
  • Add Thumbnails: Add clickable thumbnails to the bottom of the gallery with thumbnails=”true”.
    • You can change the size of the thumbnails with thumbnailsize=”x” (where x is a css unit size). Defaults to 100px.
  • Autoplay: Turn on autoplay with autoplay=”true”.
    • Transition Length: When using an autoplay gallery, you can change how long the transitions last with effectlength=”x” (where x is the number of seconds it should take to change slides) (defaults to .5 second).
    • Slide Length: When using autoplay, change the length each slide is displayed with autospeed=”x” (where x is the number of seconds each slide is displayed before moving to the next). Defaults to 4 seconds.
    • Disable controls: Hide the controls with controls=”false”. This, of course, only makes sense for autoplay slideshows.

 


 

Show Children Pages

Prints a list of the children pages of the current page.

Attributes
  • order – Desc or Asc
  • orderby – title, modified, date, or author. Defaults to title.
  • childdepth – To what depth should children of children show? Defaults to 1, meaning first level of children only.
[ list-children]

Display information about someone at Bates

Staff

Attributes

id – A Bates username.

[ batesperson id="jburns"]

Henry Burns

207-786-6331

jburns@bates.edu

Bates Communications Office

Editorial Director and Bates Magazine Editor

Lane Hall, Room 025H

Faculty

[ faculty-profile for="hjensen"]

Hilmar L. Jensen III

Associate Professor of History

Associations

History

Pettengill Hall, Room 104

African American Studies

Pettengill Hall, Room 104

American Studies

Pettengill Hall, Room 104

207-786-6070hjensen@bates.edu

About

B.A., Goddard College; M.A. and Ph.D., Cornell University

Hilmar Jensen was born in Wilmington, Delaware and educated at that city’s Friends School – the first student of color to matriculate through its entire curriculum in its 270-year history. He received a B.A. from the most educationally innovative liberal arts institution of its era – Goddard College – in 1972, followed by stints as an archivist at the Delaware Historical Society and the American Philosophical Society; research assistant to the executor of the W.E.B. Du Bois Papers; and teacher of History and Writing at Boston’s Commonwealth School. After graduate study at Cornell, he was awarded a Du Bois Fellowship at Harvard University in 1978 and afterward was appointed an Associate Fellow of Harvard’s Du Bois Institute for African and African American Research. Subsequently, he joined the faculty of Holy Cross College – and began teaching at Bates in 1992. In January 2018, he became the first person of color to chair the Bates History Department in its 163-year history. In several previous years, he chaired both the American Studies and African American Studies programs.

He offers courses on U.S. History from 1890 to 2000, African American History, the American Protest Tradition, Wartime Dissent and Civil Liberties in Modern America, Political Film and Historical Narrative, the 1960s, and Lewiston History – as well as seminars on the Civil Rights Movement, Twentieth Century American Intellectuals, the Great Depression, and Harlem from 1900 to 1954. He is proud to have recruited and hosted on campus a list of legendary Freedom Movement activists including, among others, Bob Moses, Dick Gregory, Howard Zinn, Julius Lester, William Worthy, Rev. James Lawson, and Bernice Johnson Reagon.

His long-term research examines the radical roots of the U.S. Civil Rights Movement of the 1960s in the African American Popular Front insurgency of the 1930s and 1940s.

Classes:

  • Twentieth Century America
  • African American History
  • American Protest: From the Haymarket Riot to Black Lives Matter
  • Prelude to the Civil Rights Movement
  • The Civil Rights Movement
  • Visions of the Past: Political Film and Historical Narrative

Show a post’s content in another post

This shortcode grabs the content from any other page on any other site within the Bates network and displays it as if it had been written directly on the current page.

Attributes

id – The id of the post to grab content from

blog – (optional) The name of another site in the network to look for the page/post id within.

[ purloin_content id="32295" blog="news"]

The Jimmy Bruno Trio, led by jazz guitarist Jimmy Bruno, will perform at 8 p.m. Sept 13, in the Olin Arts Center Concert Hall, 75 Russell St. General admission at the door is $10 and $5 for students and seniors. For reservations call 207-786-6135.

Bruno, first influenced by his father’s guitar work on Frank Virtue and the Virtue’s 1959 hit “Guitar Boogie Shuffle,” toured with Buddy Rich at age 19 before doing studio work and recording with Tommy Tedesco in Los Angeles. His releases on Concord Records include Burnin’, Slight of Hand, Like That and Live at Birdland. He also appeared on The Concord Jazz Guitar Collective with Alden and Frank Vignola.

Joining Bruno for the Bates concert will be his regular Philadelphia- based rhythm section: drummer Vince Ector and bassist Craig Thomas.

You can also use this shortcode in an advanced way. Using the advanced placeholders @title@, @author, and @content allows you to use the original post’s author and title, as well as have more control over where the content displays.

For example:

[ purloin_content id="51141" blog="news"]The original article was written by @author@ and was named @title@. You can read it in it's entirity here. 
@content@ [/purloin_content]
The original article was written by Bates News and was named Physics lecture to explore magnetism's effects at cellular level. You can read it here:

Brown University physicist James Valles.

A Brown University physics professor discusses the use of magnetism to alter cellular processes, such as cell division and swimming behavior, in a Bates College lecture at 2:40 p.m. Friday, Dec. 2, in Carnegie 204, 44 Campus Ave.

Sponsored by the Bates physics department, the event is open to the public and refreshments will be served.

James Valles’ talk is titled “Manipulating Life with Intense Magnetic Fields.” He will explain that while living cells tend not to be much affected by terrestrial magnetism, magnetic fields that are sufficiently intense can align certain cellular components.

Valles will describe his research into the effects of strong magnetism on such organisms as frog eggs, whose cell division is altered by its influence, and the paramecium, a single-celled organism whose swimming behavior is affected by magnetism.

Valles has taught at Brown since 1992. He received an Alfred P. Sloan Foundation Fellowship, awarded to early-career scientists with outstanding promise and unique potential to make substantial contributions to their field. Valles received his doctorate from the University of Massachusetts and his bachelor’s degree from Dartmouth College, both in physics.


Glossary

Attribute

Part of the shortcode which specifies that a certain name equals a certain value.

name="value"

This is always found inside the first part of the shortcode, between the brackets.

Opening/Closing Tag

Some shortcodes have a single element like

[example]

and some have a start and ending element like

[example] content [/example]

The first element, the [example], is the opening tag, and the second one, the [/example] is the closing tag. Note the closing tag has a /.

Content Area

In shortcodes with both an opening and closing tag, the space between the tags is the content area. Highlighted below:

[example name="value"] This is the content area. [/example]