My fork of eddiemachado's Bones for Genesis. Built for Genesis 2.3+ and WordPress 4.6+.
A starting point for new Genesis projects. This is a starter child theme, not a dependency. Clone it. Fork it. Hack it for your own projects. Build cool things on the web.
Issues and pull requests are welcome and will be addressed.
Note: As of v2.2.0, BFG uses Grunt instead of Codekit and Bower instead of Git submodules. Apologies for the extra dependencies, but I believe this is a step toward fewer compile errors and less painful project management.
You'll need Node.js, Grunt, and Bower.
git clone https://github.com/cdukes/bones-for-genesis-2-0.git genesis-bfg
cd genesis-bfg
npm update --save-dev && bower update --save
grunt
All functions are prefixed with bfg
. Do a find-and-replace to align the these function names to your project's prefix.'
- Display database query info in your footer
- Put the site in maintenance mode for non-admins
- Grunt:
- Automatic JS concatenation
- Automatic JS minification (Uglify)
- Automatic image optimization (JPEG, PNG, GIF)
- SASS & Compass support
- Autoprefixer and CSS minification support
- Watches for file changes, and notifies on error
- Enable Genesis 2.0 HTML5 support
- Enable Genesis 2.0 responsive viewport support (disabled by default)
- Unregister default Genesis layouts (template, disabled by default)
- Unregister default Genesis widgets (template, disabled by default)
- Remove Genesis 'Layout Settings' meta boxes (template, disabled by default)
- Various other hooks to tweak Genesis's setup, such as footer widget count, menu names, post format support, etc.
- 'no-js'
<body>
class for easy JS detection - Preloaded libraries: FitVids.js, iOS-Orientationchange-Fix, Superfish, SVGeezy, and jQuery placeholder.
- Submodule for normalize.scss
- Includes Genesis 2.0 clearfix
%clearfix
and%image-replacement
SASS@extend
's- Unstyled, nested selections following Genesis 2.0's style.css as a template
- A skeleton of helpful attribute resets and suggestions
- Remove
<head>
RSD and rel links (updated for Genesis 2.0) - X-UA-Compatible tag
- Template for serving better favicons to iOS and modern browsers
- Enqueue custom stylesheets
- Supports an IE-only stylesheet
- Support the IE6 Universal Stylesheet
- Supports enqueuing Google Fonts (template, disabled by default)
- Enqueue jQuery from Google's CDN, with fallback to a local copy.
- Enqueue custom scripts
- Specify custom favicon location (template, disabled by default)
- Add a 'no-js' class to
<body>
- Remove
<p>
tags from around images - Remove
[gallery]
short code injected styles - Customize the post info and meta text (templates, disabled by default)
- Customize the post navigation link text (templates, disabled by default)
- Remove the (edit) link
- Show the archive title and description, even if the Genesis fields for these aren't set (disabled by default)
- Templates to remove comments, comment forms, pings, and/or all of these (disabled by default)
- Edit search input box and button text (template, disabled by default)
- Redirect straight to the search result when there is only one result (disabled by default)
- Limit searching to only posts (disabled by default)
- Allow shortcodes in text widgets (disabled by default)
- Remove 'Recent Comments' widget injected styles
- Customize the footer 'creds' text (template, disabled by default)
- Disable pointer events on scroll (template, disabled by default)
- IE8 icon font fix (template, disabled by default)
- Force layout option for template (template, disabled by default)
- Prevent the child theme from being overwritten by a WP.org theme of the same name
- Disable self-pings
- Add new image sizes, and add them to the media size select menu (templates, disabled by default)
- Force the Link Manager to be shown/hidden (disabled by default)
- Change the /wp-login.php logo URL and title to your blog's homepage and name
- Replace the login logo (template, disabled by default)
- Make WordPress-generated emails appear 'from' your WordPress site name, instead of from 'WordPress'
- Make WordPress-generated emails appear 'from' your WordPress admin email address (disabled by default)
- Remove the 'WP' icon from the admin bar
- Change the admin panel footer text (template, disabled by default)
- Only show the admin bar to users who can at least use Posts
- Disable some or all of the default admin dashboard widgets (template, some disabled by default)
- Disable some or all of the default widgets (template, some disabled by default)
- Change the default hidden meta boxes for pages and posts (template, some hidden by default)
- Add a stylesheet for TinyMCE (disabled by default)
- Show the TinyMCE kitchen sink by default
- Change the available formats in TinyMCE (removes
h1
,h5
,h6
,address
, andpre
by default) - Add/remove contact methods from user profiles (removes AIM, YahooIM, and Jabber by default)
- Remove dashboard menus (template, disabled by default)
- Prevent the failed login notice from specifying whether the username or the password is incorrect
- Hide the top-right help pull-down button
- Disable some or all of the default Genesis theme option meta boxes (template, some disabled by default)
- Remove
bfg_jquery_local_fallback()
(again) - Run
postcss:css
ingrunt
- Add AJAX URL as a
data-*
attribute on<body>
, instead of an inline script, for better CSP compatibility (disabled by default) - More consistent
.btn
default styles
- PostCSS image inlining
- Restore jQuery fallback, but disabled by default
- Add a
Content-Security-Policy
header (disabled by default) - Move inline admin bar styles to
_type.scss
and_print.scss
- Remove avatar in admin bar
- Remove jQuery fallback
- Remove
svgs
folder - Update
%visuallyhidden
CSS
- Minor PHP spacing/style changes
- Remove
bfg_ie_font_face_fix()
- Add PostCSS modules:
postcss-flexbugs-fixes
,postcss-import
,postcss-easings
- Remove Grunt modules:
csslint
,grunticon
,stylelint
- Switch to PostCSS's
autoprefixer
, sincegrunt-autoprefixer
is deprecated - Turn off
flexbox
forautoprefixer
by default - Use
normalize.css
instead ofnormalize.scss
- Add SCSS to hide the WP admin bar on mobile (disabled by default)
- Allow
favicon.ico
to be loaded from theimages
folder
- Remove
jquery.fitvids
frombower.json
- Use
grunt-sass
instead ofgrunt-contrib-sass
(faster than Ruby) - Add
bfg_enable_svg_uploads()
(disabled by default) - Add filter for
genesis_pre_get_option_site_layout()
tolayout.php
(disabled by default) - Add
search.php
to override Genesis's
- Use brand-colors
- Use postcss-color-rgba-fallback
- Use WP 4.6's
wp_resource_hints
filter - Remove code deregistering WP's Open Sans font
- Use WP 4.6's font stack in
_variables.scss
- Remove scripts not needed on modern browsers
- Replace
FitVids.js
withvanilla-fitvids
pre_get_posts
is an action, not a filter- Higher specificity on
bfg_replace_login_logo()
- Remove
wp_shortlink_wp_head()
- Add
bfg_add_tinymce_plugins()
(disabled by default)
- Upgrade
jQuery
version to 3.0.0 - Add
jQuery
to bower and use this version for non-CDN fallback, instead of WP's version - Remove IE-specific code
- Add
.gallery
scaffold SCSS - Add wrapper default padding
- Use full
flex
syntax
- Use Stylelint for better SCSS consistency
- Force strict JS
- Added
bfg_load_child_theme_textdomain()
(disabled by default) - Updated jQuery version
- Various style tweaks
- Add
genesis_404_entry_title
filter to404.php
- Use
normalize.scss
instead ofsanitize.css
"use strict"
on JS files- Remove hyphens on paragraph text
- Remove superfish
- Remove
:focus
override - Tweak default styles
- Tweak
@media print
styles - Fix bugs related to
include-media-export
usage - Add
bfg_limit_menu_depth
to limit the number of submenus for the default menus - Enable more HTML5 and accessibility features
- Add archive SCSS template
- Enable JS source maps
- Add
bfg_remove_meta_boxes
- partially disabled by default - Remove the Genesis user meta boxes - disabled by default
- Remove
genesis_upgrade_redirect
- Use
sanitize.css
instead ofnormalize.scss
- Remove
bfg_highlight_non_breaking_spaces
- Unhook
genesis_load_favicon
by default - Fix JS error in
bfg_disable_pointer_events_on_scroll
- Remove
bfg_do_taxonomy_title_description
- Use
.htaccess
to block access to development assets - Switch to
js-cookie
, sincejquery-cookie
is deprecated - Turn
genesis-responsive-viewport
on by default - Remove spaces on footer scripts + better HTML formatting
- Remove WP-API material
- Turn off TinyMCE's auto-expand
- Fix
Colors
partial reference
- Remove
bfg_ie_style_conditionals
- Turn off
semantic_headings
by default - Use
.form-table
for admin options - Disable the 'Open Sans' loaded by the admin bar
- Add option to remove the Genesis 'Layout Settings' meta box for terms (Disabled by default)
- Use include-media and include-media-export to unify SCSS and JS breakpoints
- CSS tweaks
- Update
PHP-CS-Fixer
options - Remove excessive
%clearfix
use
- Better clearfixes
- Update
bfg_load_favicons()
for latest OSes
- Merge
bfg_load_stylesheets()
andbfg_load_scripts()
intobfg_load_assets()
- Remove IE universal stylesheet
- Add
dns-prefetch
for CDN-based resources - Unhook
genesis_register_scripts()
- Allow shortcodes in text widgets by default
- Turn on filters for
the_content_more_link
,excerpt_more
,get_the_content_more_link
,genesis_prev_link_text
, andgenesis_next_link_text
by default - Remove
bfg_letterspace_abbreviations
andbfg_hard_space_expressions
- too many issues with HTML tags being broken - Disable
img { width: auto; height: auto; }
by default
- Accessibility updates for Genesis 2.2
- Other CSS tweaks
- Remove Gravity Forms-specific JS + CSS
- Check for
window.addEventListener
before runningbfg_disable_pointer_events_on_scroll()
, for better IE8 compatibility - Remove unnecessary role attributes
- Remove
csslint
fromgrunt build
- Autofocus password input on single post page
- Disable
bfg_hard_space_expressions
@extend %type;
on more elements
- Report the number of cron tasks in queue on the admin bar (disabled by default)
- Make
404.php
translation-ready - Add
ul, ol { overflow: hidden; }
for better wrapping around images
- Rename
csscomb.json
to.csscomb.json
- Rename
.csslintrc
tosass/.csslintrc
- Remove
remove-empty-rulesets
from.csscomb.json
, sincefalse
isn't an allowed value - Force a default color on form elements
- Add
remove-empty-rulesets
tocsscomb.json
- Also CSSComb
_variables.scss
- Disable
bfg_letterspace_abbreviations
- causing issues with HTML attributes - Encode Google Font SRC properly
- Move page templates to subfolder
- Fix use of
word-break
to properly wrap overflowing words - Include
grunt-contrib-csslint
. This can be triggered withgrunt csslint
, as it isn't (yet) part ofgrunt build
- Remove
bfg_custom_template_body_class
frompage_custom.php
. (I like using the auto-generated template<body>
classes.) - Make theme strings translatable, with a consistent
CHILD_THEME_TEXT_DOMAIN
domain - Add
bfg_schema_empty()
and hooks to remove some schema attributes added by Genesis (disabled by default) - Set default credit text for
bfg_admin_footer_text()
- Block XMLRPC_REQUEST by default and delete
xmlrpc.php
on core upgrade - Better, environment-aware
add_editor_style()
, disabled by default - Remove
bfg_query_stats()
andbfg_maintenance_mode()
helper functions. There are much better plugins for both. - Disable comment feed RSS in
<head>
by default - Remove
<meta name="referrer" content="origin">
, since it causes a redirect bug with password-protected posts - Use WordPress SEO's breadcrumbs when available, falling back to Genesis's method
- Add
font-variant-ligatures
attribute - Update
jQuery
- Run
autoprefixer
ingrunt:default
- Add a
Assets Version Number
field to Genesis options, for cache busting - Disable
text-rendering: optimizeLegibility;
, per this article
- Highlight non-breaking spaces in drafts to give the author a chance to correct them
- Letterspace strings of capitals
- Link numerical expressions with hard spaces
- Also flush cache in
bfg_clear_transients_node
- 404 template fixes
- Remove
<meta http-equiv="cleartype" content="on">
from<head>
- Add
<meta name="format-detection" content="telephone=no">
(disabled by default) - Remove
figure
andblockquote
margins - Remove
Picturefill
script - Update
@media print
styles from HTML5 Boilerplate
- Configure and run PHP Coding Standards Fixer
- Added
bfg_downsize_uploaded_image
, which will reduce the original uploaded image to the specified size (disabled by default)
- Alphabetize packages
- Add
.clear
class - Better
bfg_remove_dashboard_menus
implementation - Add
<meta name="referrer" content="origin">
tobfg_do_doctype
, to preserve referrer information when moving from SSL to non-SSL (disabled by default)
- Remove
genesis_loop_else
from 404 page - jQuery 2.0-compatible
superfish
check - Use semantic headings
- Turn off
bfg_ie_font_face_fix
by default (replaced by SVGs) min-height
for grid classes- Minor CSS tweaks
- Trim extra spaces
- Include
autoprefixer
inGruntfile.js
watch
- Set
nonull
totrue
ongrunt:concat
, so warn about missing source files
- Move
@mixin breakpoint {}
to_mixins.scss
- Add
acf-json
folder placeholder for Advanced Custom Fields integration - Add scaffold for admin JS and CSS files (disabled by default)
- Better 404 page text
- Incorporate some type settings from Medium
- Genesis theme setting defaults
- Add
ajax_object
JS variable (disabled by default) - Use jQuery 2.x, with a 1.x fallback for old IE
- Only trigger
grunticon
if SVGs exist
- Add a
Use Production Assets?
theme setting (unchecked by default), to enable switching between minified and un-minified assets - Remove
grunt-colorguard
- Add
grunt-contrib-jshint
andgrunt-csscomb
- Add
grunt icon
for SVG handling - Split Grunt into tasks:
default
(for development) andbuild
(for checking and minifying)
- Add
csscomb.js
topackage.json
. I would love to integrate combing into Gruntwatch
, but I can't figure out a friendly way run it on.scss
files that I'm currently editing. For now, it can be run on the command line withcsscomb sass
. - Modify
.csscomb.json
to work withcsscomb.js
- Run
csscomb.js
onsass/*
return
bfg_admin_footer_text()
, since it's a filter
- Add
jquery.cookie.js
- Automatically remove
readme.html
(and optionallyxmlrpc.php
) after a WP core update
- Add a default spinner, with Gravity Forms support
- Better HTML handling for WP system emails
- Add function to get an array of image sizes
- Add hook to remove dashboard Activity widget
- Add hook to remove secondary sidebar
- Disable Genesis SEO by default, without conflicting with Genesis's method
- Consistent EOF line
- Disable Genesis SEO by default
- Running
Clear Transients
always returns you to/wp-admin/
- Avoid
console
errors in browsers that lack a console - Add
order
to.csscomb.json
sorting
- Use latest version of jQuery 1.x by default
- Include
animation-fill-mode
in.csscomb.json
- Run CSSComb on
.scss
files - Add
.csscomb.json
project file
- Better
.gitignore
- Fifths grid classes
- Turn off sourcemaps in Grunt
- Only overwrite
input[type="password"]
font on IE8 - Add default HTML/CSS for password protected post form
Gruntfile.js
: More consistent syntaxGruntfile.js
:sass
now usesprecision: 3
Gruntfile.js
:concat
no longer includes the entire/js/
folderGruntfile.js
:autoprefixer
now uses the defaultbrowser
settingGruntfile.js
:csso
now keepsrestructure
off by defaultGruntfile.js
:colorguard
is no longer run by default- Added some default styling for the search form
- Added Chrome on Android and iOS web app lines to
bfg_load_favicons()
- Added some styles fixes from H5BP
- Use Colors for better default color variables
- Don't check
is_admin()
inwp_enqueue_scripts
, since that hook is only called on the frontend - Better universal box-sizing
- Use CSSO for CSS magnification
- Set all package versions in
package.json
to*
, so that NPM will download the latest versions, then update the file with that info, onnpm update --save-dev
- Set Bower to always pull the latest versions of its dependencies
- Removed
grunt-svgmin
, sincegrunt-contrib-imagemin
now supports SVGs - Added
grunt-newer
, so that only changed images will be optimized when Grunt is watching for changes - No longer create a
style.prefixed.css
file. Replacestyle.css
with the prefixed version - Added
grunt-colorguard
, which outputs warnings about similar CSS colors
- Version bump for Genesis 2.1.0
- Added
<meta http-equiv="cleartype" content="on">
for better font rendering on mobile IE - Added better
show_admin_bar
filtering, as the old version was triggering errors in BuddyPress and bbPress. - Better use of semver. Bower will now update its dependencies to the latest minor release of the indicated major version. (ex. It'll update to Normalize v3.0.2 and v3.1.0, but not to v4.0.0.)
- Added code to disable XML-RPC entirely (code is disabled by default)
- Fixed some code formatting issues
- Enabled
bfg_remove_xmlrpc_pingback_ping
by default - Removed
bfg_remove_ptags_on_images
, since it no longer works. As an alternative, I've suggested makingwpautop()
's block elements list filterable - Set
appearance: none;
oninput
elements by default
- jQuery version update
- Added CSS to hide the spinner on
input[type="number"]
(disabled by default) - Use
genesis_footer_output
instead ofgenesis_footer_creds_text
to filter footer HTML
- Added Picturefill
- Added a clear transients button to the admin menu
- Add a plugins link to the appearance admin bar menu
- Better
add_theme_support( 'html5' );
, include WP 3.9's HTML5 galleries - Added template for changing image crop positions (disabled by default)
- Added template to deregister Genesis parent theme page templates (disabled by default)
- Update TinyMCE filters for WP 3.9, which uses TinyMCE 4
- Fixed removal of
no-js
class
- Refactored the starter CSS
- Added template to allow pages to have excerpts (disabled by default)
- Use IE indicator classes in the
<html>
tag, instead of a separate IE stylesheet - Remove manifest link
- Added function to disable pingbacks (disabled by default)
- Grunt will now watch SASS, JS, and image subfolders
- Added option to remove feed links (disabled by default)
- More consistent code spacing
- Place SASS first in Grunt process order
- Added hook to remove breadcrumbs (disabled by default)
- Better list style defaults
- Added SVG optimization, via Grunt
- Prevent direct access to PHP files
- Grunt integration
- Remove Compass @includes and sass-flex-mixin, instead use Autoprefixer
- Update jQuery to 1.11.0
- Document to use
--save
option when updating Bower - Require PHP files instead of including them, as in StudioPress's example Genesis child theme
- Removed iFrame border by default
- Updated normalize.scss repo reference
- Migrated submodules to Bower
- Added jQuery Placeholder plugin
- Fixed jQuery version reference in
includes/header.php
- Removed
bfg_prevent_child_theme_update
, since Genesis 2.0.2 now does this.
- Added
$rss
social color variable - Caption container
width
should beauto
- Split
.entry-pagination
and.archive-pagination
styles - Removed
overflow: hidden
on.entry-content
, as it causesoutline
no child elements to sometimes be partially hidden
- Hide edit links by default
- Added
X-UA-Compatible
<meta>
tag - Added jQuery fallback, if Google CDN fails
- Added script to disable hover events on scroll (disabled by default)
- Prevent authors and contributors from seeing media that isn't theirs (hidden by default)
- WP 3.8 login logo styles
- Show archive term title if no Genesis title is set (disabled by default)
- Force monospace font for
input[type="password"]
. This resolves an issue with some @font-face fonts in IE8. - Limit form field widths to width of container
- Added a
.one-fifth
grid option - Added
%unstyled-list
SASS extend - Added retina breakpoint
- Added a template to deregister the default Genesis menus, and add your own (deactivated by default)
- Added flexbox mixins, pending proper Compass support
- Added a template to limit searches to just posts (deactivated by default)
- Added hooks to hide the author box on single posts and/or archive pages (deactivated by default)
- Use fixed site width on old IE fallback.
- Use
@extend %clearfix
where practical - Don't bold or hide outline on input:focus by default
- Better old IE icon font redraw script
- iOS7 Favicon support
- Better list style skeleton in
_content.scss
- Added a
visuallyhidden
@extend - Added a template for removing pings, or the entire comments area (deactivated by default)
- Added hooks to remove the post_info and post_meta areas (deactivated by default)
- Added granular excerpt text filtering (deactivated by default)
- Added Superfish for IE8 compatibility with drop-down navigation
- Added template for additional TinyMCE buttons
- Added SVGeezy as a submodule
- Added a filter to change JPEG quality (disabled by default)
- Force the IE-only stylesheet to load after the main stylesheet
- Added code to remove the comments reply form. Disabled this code and the
genesis_do_comments
removal code by default. - Deactivated the IE-only stylesheet by default
- Moved jQuery to the footer
- Added a footer script to redraw
@font-face
fonts on IE8. (Enabled by default - if you're using BFG, I hope you're using icon fonts, as well.) - Submodules update
- Removed duplicate
box-sizing: border-box;
oninput[type="search"]
- Added a
hide-print
class - Removed
genesis_older_link_text
andgenesis_newer_link_text
link filter templates, since they're not used in G2.0 - Added
bfg_remove_scripts_meta_boxes
to remove the scripts metaboxes from posts and/or pages in G2.0
editor-style.scss
now imports some basic styling (type, grid, objects/images) and is toggled 'on' by default- Better fixed-width site support (commented out by default)
- Hide widget overflows
- More concise
_header.scss
.button
is now styled withbutton
- Added
genesis-style-selector
template (off by default) - Added option to change the media manager default view to 'upload', instead of 'library' (off by default)
- Remote scripts and styles are now registered protocol-agnostically
A quick update for Genesis 2.0 launch day compatibility
- Updated
.navigation
selector to.archive-pagination
and.entry-pagination
- Updated to new Genesis
clearfix
- Updated to
add_theme_support( 'html5' );
, instead ofadd_theme_support( 'genesis-html5' );
- Added better incorrect login credentials error text
- Added theme support options for a custom header and post formats (disabled by default)
- Added snippets for removing the header, site title, site description, nav menus, post title, and post edit link (all disabled by default)
- Removed
table
clearfix, as it was causing<thead>
s to collapse - Added
%inline-block
helper SASS bfg_load_scripts
doesn't need to be called with priority999
- Removed measurements from
_headings.scss
- Added a custom body class function for page templates
- Cleaner
bfg_remove_dashboard_menus
- Removed (non-functional) option to disable the link manager
- Added better defaults to
bfg_remove_theme_settings_metaboxes
- Moved
comment-reply
enqueuing frombfg_load_stylesheets
tobfg_load_scripts
- Better word break and text overflow handling
input[type="search"]
needs to be explicitly givenbox-sizing
. Weird.- 'Better Helvetica' starter sans-serif font stack
- Buttons should have base
line-height: 1
- Added WooCommerce theme support declaration (disabled by default)
- jQuery version bump
- For
comment-reply
script loading, changedis_singular()
tois_single() || is_page() || is_attachment()
inbfg_load_stylesheets()
for better granularity - Added function in
search.php
to redirect directly to the result on searches with only one result (disabled by default) - Title links should typically inherit their
.entry-title
color, not show the default link color - Added filters in
post.php
to customize the older/newer post navigation text (disabled by default) Readme.md
updates
- Removed
genesis_footer_backtotop_text
filter, since it's deprecated in Genesis 2.0 with HTML5 - Added support for better favicon display
g_ent
is deprecated in Genesis 2.0. Switched tohtml_entity_decode
, with better characters for post prev/next navigation- Styled
pre
likeblockquote
in_print.scss
- Added a button click effect extend in
_toolkit.scss
- IE image height correction
- Better input skeleton styles
- Added a starter breakpoint mixin
- Normalize.scss submodule update
- Removed page-templates folder. Templates should be in the child theme root, to properly overwrite the Genesis parent templates.
- Gave
input[type="search"]
explicit box-sizing. - Moved
@import "shame"
to the bottom ofstyle.css
- Removed
rem
font sizing skeleton - Removed
margin-bottom: -4px
from image links - Added
.hide-no-js
helper class - Added
add_theme_support( 'custom-background' )
- Initialize Genesis's
init.php
file directly now, instead of using thegenesis_setup
hook - Added child theme definitions (
CHILD_THEME_NAME
,CHILD_THEME_URL
,CHILD_THEME_VERSION
) - Commented out
text-shadow: none;
from::selection
, since this prevents all selection styling unlessbackground-color
is also specified - Removed
_grid.scss
responsive styling, since it was causing awkward breakpoint issues on non-responsive sites. - Commented out
body { text-rendering: optimizeLegibility; }
, since this can cause display issues on poorly generated fonts. - Removed default floats in
_layout.scss
- Added skeleton selectors for more HTML5 input types
- Better
_print.scss
- Assume SVG login logo
- Toggle link manager on/off
- Added genesis-footer-widgets option
- More consistent SASS formatting
- Commented out
width: auto
on images - Added
_shame.scss
file
- Initial release of Genesis 2.0 BFG fork