THIS IS AN OLD README FILE. NEEDS TO BE UPDATED FOR LATEST CHANGES.
Tags: accessibility-ready, blog, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, footer-widgets, full-width-template, grid-layout, left-sidebar, one-column, right-sidebar, sticky-post, theme-options, threaded-comments, two-columns, wide-blocks
As the cwd_base theme is updated, the goal here is to apply those updates to this theme without overwriting any WordPress-specific files or code. This is easily done. Just five portable folders are required for framework updates:/css
/fonts
/js
/sass
/images
This theme contains three extra SASS files:
cwd_wp.scss
admin.scss
editor-style.scss
Four extra JS files:
cwd_wp.js
admin.js
siteimprove.js
formidable_validation.js (a11y helper for Formidable Forms)
And an extra image folder:
/images/wp
Functions
ALL theme functions exist in the /functions folder or are called from functions.php.
Templates
WordPress default templates in the root folder are called first:
archive.php
category.php
footer.php
front-page.php
header.php
index.php
page.php
search.php
single.php
sidebar-top.php
sidebar-bottom.php
tag.php
taxonomy.php
Template parts
The bulk of any customizations will happen in the /templates folder. Template parts are called from the default templates, and naming conventions are based on post types, categories, terms (tags and custom taxonomies).
Examples:
- WordPress requests a regular page, and page.php provides the basic markup. When it reaches the content loop, it looks for the template part called content-page.php. That will be the default page loop for all pages, but if you need to customize the loop for the About page (as an example), simply copy content-page.php and rename it content-page-about.php.
- The news archive page is requested by WordPress and archive.php will provide the basic page markup. The loop, however, looks for a template part, and the first template part it will look for is content-archive-news.php. If it doesn't find content-archive-news.php, then it will just use content-archive.php. Copy content-archive.php and rename it content-archive-news.php to customize the news listings.
<!-- Content Types: uncomment to activate -->
'/functions/content-types/news/post-type.php',
'/functions/content-types/events/post-type.php',
'/functions/content-types/people/post-type.php',
TO DO: add these post types (and others) as options on the Theme Options page. DONE
Note: The news and events content types are based on two CD plugins by philwilliammee located here:
News: cd-news-pull-wp-plugin
Events: cd-events-pull-wp-plugin
Both plugins are still under active development, but can be found and updated within this theme in the /functions/content-type folders.
Custom fields
People: name, description, image, title, department, and website URL
News: image, title, description, date of publication
Events: image, title, description, start date, end date, start time, end time, all day, location, room, event URL, Zoom link, contact email
*All custom post types have the "Feature on front page" option built-in, including the WP_Query required for such an option. Call it a time saver.
Custom taxonomies
The news content types uses the default (WP core) tags and categories, but the events content type uses three custom taxonomies:
event_tags
event_types
event_groups
Important! This theme does not use pages for custom post type archives. It uses the default slug that is programmed when the content type is created. This slug can be anything, but it does not require or use an actual page with the same name. This can be confusing, because if a page with the same name does exist (such as a news page for news archives), then none of the in-page options will apply to the archive listings and keeping such a page in the page hierarchy is essentially meaningless. However, this theme makes use of the hitherto useless and meaningless page by inserting the editor content from that page above the archive listings, if such content exists.
CustomizerSite Identity: site name and tagline
Banner: color, logo, logo size, and mobile
Header image: the header image that is assigned in the customizer will be the sitewide header, unless overridden on a per page (or per section) basis. Cropped to 1280x320.
Background image: this theme supports background images for the main body of the page, but it is debatable whether or not this should be an option. With the right image, it could be great, but sometimes we do things just to see if we can :)
Menus: core menu options, also available on the Settings->Menu page
Widgets: core widget options, also available on the Settings->Widgets page
Homepage Settings: set home and blog pages, also available on the Settings->Reading page
Additional CSS: self-explanatory
Section Titles: three widget areas below the main content and above the footer. Add a title to these sections with the option to center the title and/or center the text (if it is a text widget).
Social icons: add a social media URL to show the corresponding icon in the footer. There are only five available now, but many more are available in footer.php. Just uncomment them to activate them. Uses .svg icons available in the base framework.
In-page options
The options available on individual pages include sidebar positioning, header images, and custom URLs for pointing any content to an external URL.
The so-called featured images are used as banner images only, so an extra image field has been added to provide the usual featured functionality which provides thumbnails and/or main content area images.
The home page contains an additional option to replace the home page featured image with a slider. This is a one-click option which will insert a slider and instruct the user how to add images.
Theme Options Page
Home Page: change, remove, or replace the home page title , remove breadcrumbs from the home page.
Blog Page: change, remove, or replace the blog page title, add introductory text
Main navigation: change the menu depth from the default 2. Choices: 1, 2, or 3
Sidebars: default placement of the sidebar is to the right of the main content, but this can be overridden on a page by page basis from the page edit screen. Empty sidebars will force a full-width (no sidebar) layout, regardless of individual page options. The theme options page allows you to choose tinting options from the base theme: tinting or no tinting, full tint or fade to white.
Archives: archives do not contain in-page options, since they are not pages: the main blog page, custom post type archives, search results, and category and tag pages. Choose sidebar position, appearance (list or grid), and metadata options for all such archives. Also choose the excerpt length in number of characters.
Footer: primary and secondary footer areas. The primary footer area can optionally contain up to two menus. The secondary footer area is usually reserved as an address block. These options allow you to edit the address block and optionally add headings and introductory text above the menus in the primary footer area.
The default WordPress image gallery has been adapted to use the markup and classes from the base theme framework.
Pagination options can be found in the main menu under Appearance->Pagination.
- Make a TO DO list