Site Documentation

This page is to document how this site works, and how best to maintain it.

Custom Post Types

The most changeable portions of the site are maintained via WordPress “Custom Post Types” (CPT’s).  CPT’s allow a post to be written on a particular topic such as a Biography or a Recipe.  

  • Those posts can then be displayed as a set of links on a cover page, each leading to the detail post.  
  • Each CPT can be defined with specific fields (date of birth/death, recipe ingredients/instructions) that are entered very simply.  
  • All the data entered can be given a consistent display via a Template that tells where on the page to show each field.

Each CPT post can have the following information:

  • Title
    • This is often a person’s full name, such as Thomas Cosby Cunningham.
  • Featured Image
    • If no image specific to the post is available, use a placeholder such as the home-page image or another group photo.  For Military Service, the flag-postcard image works well.
  • Excerpt
    • This is very limited: text only, and no more than one short sentence.  Think of it as the caption for the post.
  • Editor section
    • Note: Plain text can be entered directly into the editor.  But for more control of the layout, such as including images, the Edit with Elementor option is preferred. General, start with the Text Editor widget for the main body of the post, then add Titles, Images, or other widgets as desired.
  • Additional Custom Fields
    • These vary depending on the post type.  See the detail descriptions below.
  • Categories
    • These checkboxes in the right sidebar help determine which cover page(s) will list this post. More than one category may be checked on the same post, but not all categories apply to all post types.  See the detail descriptions below.

The CPT’s in use on this site are shown below.  Open each section to see the details for that particular CPT.

Biography posts may be written for any member of the family. They are necessary for any family member who will have an associated Story CPT.

Custom fields are Date of Birth and Date of Death.

The Excerpt is not used.

Cover pages use the Featured Image and the Title (the person’s full name).

Biographies are shown on the following pages of the site:

  • The Cunningham Children …if the “Family” Category “Cunningham Sanders Child” is checked.
  • The Sanders Siblings …if the “Family” Category “Sanders Springfield Child” is checked.
  • The Cunningham Siblings …if the “Family” Category “Cunningham South Child” is checked.
  • Cunningham Family History …if the “Family” Category “Cunningham Ancestor” is checked.
  • Sanders Family History …if the “Family” Category “Sanders Ancestor” is checked.
 
Biographies may also be shown as a “Related Biography” on any of the other Biography pages …if the “Story Person” Category is checked for a person with the exact name as the biography Title.  The first time a Story (or Military Service) is added for a new Biography, their name must be added to the Story Person Category options.

Story posts may be written for any story or other information that will be associated with a specific Biography person.

There are no custom fields. 

The Excerpt is used to give the source of the story: “From the files of…” or “As told to…”.

Cover pages use the Featured Image, the Title and the Excerpt.

Stories are shown on any of the Biography pages …if the “Story Person” Category is checked for a person with the exact name as the biography Title.  The first time a Story (or Military Service) is added for a new Biography, their name must be added to the Story Person Category options.

Military Service posts may be written for any member of the family. 

Custom fields are Family Relationship (“son of…”), Military Branch and Rank, and Service Dates. 

The Excerpt is not used.

Cover pages use the Featured Image and the Title (the person’s full name).

Military Service posts are shown on the following pages of the site:

  • Any of the Biography pages …if the “Story Person” Category “ is checked for a person with the exact name as the biography Title. The first time a Military Service (or Story) is added for a new Biography, their name must be added to the Story Person Category options.
  • The Family History page for the “Family” Category checked (Cunningham or Sanders).

All Military Service posts are shown on the Military Matters page, grouped according to the War Category that is checked.

Cemetery posts may be written as needed. 

There are no custom fields. 

The Excerpt is used for the cemetery location (“Vernon, AL”).

Cover pages use the Featured Image, the Title and the Excerpt.

All Cemetery posts are shown on the Cemetery Information page for the “Family” Category checked (Cunningham or Sanders). 

Note that as of August 2020, all articles are Sanders so there is no cover page for Cunningham yet.

Recipe posts may be written as needed. 

Custom fields are Ingredients and Instructions. 

The Excerpt is used for the recipe source (“Recipe by Sandra Scott”).

Cover pages use the Featured Image, the Title and the Excerpt.

All Recipe posts are shown on the Family Recipes page.

Recipes should check the “Family” category for Cunningham or Sanders, in case of future wish to do separate Family sections.

Photo Gallery

The Photo Gallery page is maintained using the Elementor “Premium Media Grid” widget.  It allows individual images to be included, each associated with a Category that allows selection via the Filter at the top of the page.

Current categories are “Cunningham” and “Sanders”.  Others can be added as needed.  An individual picture can be associated with more than one category if desired.  Note that the Categories are defined in one section of the widget, and associated with a picture in a different section.  If there is a typo on the picture so that it does not exactly match the category spelling, it won’t show up as expected.

To add a new picture,

  • Click the Add Item button.
  • Click the Image box to choose (or upload) from the Media Library.
  • Fill in a Title that will be displayed with the picture.
  • Fill in the Category, with exact spelling match.
  • Description is optional, not used as of the initial launch of the site.
  • Link is optional, but can be used to link to a matching Biography, Military, Story, etc.
    • Link Type = URL
    • Link = “Internal URL”
    • Type = “Content”
    • Search for the exact page needed.
    • Set the Whole Image Link button to Yes.
    • Leave the Whole Image Lightbox button set to No.
  • If not using a Link, then set the Whole Image Lightbox button to Yes.  That will allow a larger version of the image to be displayed when clicked.

Technical Stuff

CPT’s are maintained using plugins CPT UI and Advanced Custom Fields.

Site-level defaults are done with the Elementor Default Kit template.  Default page headers and footers, as well as CPT detail-page layouts, are done with Elementor templates as well.  Note: On the Military Matters page only, a Global Widget shortcode is used to display a Posts widget within each Accordion entry.

Some of the page widgets, most notably the Posts widget used to display CPT’s on their cover pages, are Pro features of Elementor.

The only custom PHP code is in an important Code Snippet.  It defines the person_stories custom query ID that decides which Stories and Military posts are shown on a Biography page.

The color scheme used in this site is 

  • “Wheat” (color code ebd5b3) for page background and most light text on dark backgrounds.
  • “Oxford Blue” (color code 142a4c) for most headings and text.
  • “Saddle Brown” (color code 964b00) for most accents
  • “British Racing Green” (color code 004225) for button backgrounds and some accents.
  • “Gainsboro” gray (color code e0dada) for light text on the home page and some accents.
 
These colors can be seen as a palette on coolers.co.