Site Documentation


Shortcodes are custom pieces of code that allows for special formatting within a post or page. This provides pages and posts to have a consistent layout that would be more challenging with the default editor.

Shortcodes are detected by WordPress with the format of [shortcodeName parameter=””] text [/shortcodeName]. Some shortcodes do not surround the post’s text and would not require the closing brackets.

Below are the shortcodes I have created for Cooking Vacations:

Site-wide Shortcodes:

Image Block-- Formats a block of text with an image to the left side.
  • Format: [imgBlock img="" width="" height=""] [/imgBlock]
  • Parameters:
    • img -- The URL of the image, uploaded into WordPress
    • width -- The width of the image
    • height -- The height of the image
colorBox-- Places the containing text in a box formatted with one of four colored backgrounds.
  • Format: [colorBox color=""][/colorBox]
  • Parameters:
  • color -- Choose one of the following colors:
    • blue
    • green
    • yellow
    • rose
photoColumn-- Formats a list of images to reside on the left side of either the rightColumn or tourColumn shortcode.
  • Format: [photoColumn] [/photoColumn]
  • No Parameters are required.
rightColumn-- Formats the text to the right of the photoColumn.
Format: [rightColumn] [/rightColumn]
imgMenu-- Lays out a list of images in a grid format. Can be used for menus (the Recipe Book page for example) or just to lay out a group of images (any of the accomodation posts)
  • Format: [imgMenu] [/imgMenu]
  • No Parameters are required.
threeColBlock-- This is the wrapper code for a page or post that is laid out in three columns. This requires the following three shortcodes.
Format: [threeColBlock] [/threeColBlock]
col-1, col-2, col-3-- These three shortcodes work with the threeColBlock shortcode to format the containing text into a three column format.
Format: [col-1] [/col-1] (change the 1 to 2 and 3 )
imgPopup-- Allows an image to popup in a lightbox.
  • Format: [imgPopup url="" width="" group=""] Parameters:
    • url -- The URL of the image uploaded in WordPress
    • width -- The width of the image displayed in the post
    • group -- The lightbox will provide previous and next links for a group of images. This parameter will group the images for this function.
otherPost-- Takes the content from another post and inserts it into this one. Useful to duplicate tours, but keep the title and tour category.
  • Format: [otherPost post_id = ""]
  • Parameter:
    • post_id -- The ID of the post you want to take the content from.

Page Specific Codes:

sc-link-- This shortcode was created for the lightbox link effect on the Saint's Calendar. It shouldn't be used for other pages.
  • Format: [sc-link title="" content=""width=""]
  • Parameters:
    • title -- The name of the holiday, with formatting
    • content -- The URL of the holiday description page
    • width -- The width of the block of text.
ItalianBitesBar-- Adds the navigation menu for the Italian Bites Section
Format: [ItalianBitesBar]
cvNewsletter-- This will provide the formatting for the newsletter.
  • Format: [cvNewsletter section="" title=""][/cvNewsletter]
  • Parameter:
  • section -- Type in a section name from below.
    • intro
    • table-talk
    • recipes-of-the-month (For this one, use the otherPost shortcode to get the content from the Recipes of the Month post.)
    • food-notes
    • with-love-from-italy
    • italian-feasts
    • italy-on-a-plate
    • restaurant-of-the-month
    • book-of-the-month
    • property-of-the-month
    • chef-of-the-month
    • general
  • title -- Type in the title for the section

Tour Specific Codes

tourColumn-- Formats the text to the right of the photoColumn. There are some slight formatting changes for the tours that differ from the rightColumn shortcode.
  • Format: [tourColumn] [/tourColumn]
  • No Parameters are required.
tourDisplay-- Displays the tour categories and associated tours based on the non-regional tour category (seasonal, Renaissance Women, etc).
  • Format:[tourDisplaytour_slug=""]
  • Parameter:
    • tour_slug -- The slugfor the tour category.
accomPhotoGal-- Provides the link and formatting for the Accomodation post for a tour.
  • Format: [accomPhotoGal url=""]
  • Parameter:
    • url -- the URL of the accomodation post. It can be the shortlink or the full url of the post.
ToILink-- Provides the link and formatting for the Tastes of Italia pdf in a tour post.
  • Format: [ToILink url="" date=""]
  • Parameter:
    • url -- The URL of the pdf uploaded to WordPress
    • date -- The month and year of the ToI publication.
backTop-- Creates the "Back to Italy Tours & Back to Top" links in a tour post.
Format: [backTop]

The codes below are for the tours, but are specific to the main tour page, and are not to be used on any other page.

tourBar-- This creates the region bar on the main tour page, as well as the tour post.
  • Format: [tourBar region="" text=""]
  • Parameters:
    • region -- The slug for the region. The associated region imageand map image are based on the slug.
    • text -- The description for the region.
tourSubCatDisplay-- This shortcode is used only on the main tour page. It displays the tour categories and associated tours based on the region. It should not be used on any other page than this one. I'm including this to have a complete document.
  • Format: [tourSubCatDisplay top_category = ""]
  • Parameter:
    • top_category -- The slug for the region.