Genesis 3.1 beta is out now! The beta is packed with hotly requested features for developers and site owners alike.
How to try the beta
Experiment with new Genesis 3.1 features safely using a local development environment or testing server with the Genesis Beta Tester plugin. Or wait for the official release of Genesis 3.1 at the end of August 2019 and upgrade your production sites then.
Genesis 3.1 requires PHP 5.6+. It works best with a Genesis HTML5 child theme, WordPress 5.0+, and the Block Editor enabled so you can make the most of every new feature:
Edit your footer credits text in the Customizer
Every site deserves a custom sign-off, so editing your footer credits is now a few clicks away. No more plugins or code snippets to change the footer text.
Find the new footer text field at Customize → Theme Settings → Footer. You can include text, shortcodes, and HTML to create footer content that suits your needs.
If you currently use Genesis Simple Edits to edit your footer credits text, Genesis 3.1 will automatically import the text from Simple Edits so that your footer remains unchanged.
The genesis_footer_creds_text filter is now deprecated. Developers can point users who want to edit their footer text to the new Genesis footer setting in the Customizer. If you want to set default footer text for your child theme during theme activation, you should set the footer_text key in your theme’s child-theme-settings.php file. You can use the default Genesis footer text as a starting point, which you will find in config/customizer-theme-settings.php.
Output featured images on singular content
Genesis 3.1 makes it easier for theme developers to offer users the option to output featured images on posts, pages, and other content types.
The new Genesis featured image output settings are off by default so that they do not break any existing featured image output functionality your sites are using.
Theme developers can enable support for Genesis featured image output on specific post types:
add_post_type_support( 'post', 'genesis-singular-images' ); add_post_type_support( 'page', 'genesis-singular-images' );
Adding support in this way does two things:
- Adds a checkbox to the new Customizer panel at Theme Settings → Singular Content for each post type, as in the screenshot above.
- Outputs images on singular entries if those checkboxes are enabled.
Images use the archive image size from Theme Settings → Content Archive → Featured Image Size by default. Theme developers can set a default image size for all singular featured images by adding a custom image size to their theme:
add_image_size( 'genesis-singular-images', 200, 300, true );
And override that for featured images from specific post types:
add_image_size( 'genesis-singular-image-[type]', 600, 300, true );
Developers can also adjust the image output position:
remove_action( 'genesis_entry_content', 'genesis_do_singular_image', 8 ); add_action( 'genesis_[your_choice]', 'genesis_do_singular_image' );
You can extend the new Singular Content area by filtering the Customizer theme settings config.
New Genesis sidebar for the Block Editor
Get easy access to Genesis page and post settings from the new Genesis sidebar in the Block Editor.
When editing content with the Block Editor in WordPress 5.0+, you will see a new Genesis icon above the editor. Click that icon to access Genesis page options:
The Genesis page layout selector and custom class fields have moved to this new Genesis sidebar for block editor users. These options used to live in the Layout Settings meta box far below your post content. You told us it was no fun scrolling to the bottom of your post just to alter the layout, and we agree! If you are not using the block editor, you will still see the Layout Settings box instead of the Genesis sidebar.
We are also introducing new page-specific settings to the Genesis sidebar, starting with two new options in Genesis 3.1 for “hide title” and “hide breadcrumbs”.
Bonus tip: if you unpin the Genesis sidebar from the Block Editor by clicking the star next to the “Genesis” heading, you can still access Genesis settings from the Block Editor “tools and options” menu. Click the three dots next to the Publish/Update button and choose “Genesis”.
New Hide Title and Hide Breadcrumbs options
You can now hide your title and breadcrumbs on individual entries without using a plugin or custom code.
Find the new “hide title” and “hide breadcrumbs” option at the top of the Genesis sidebar in the block editor. “Hide breadcrumbs” appears on posts and pages. “Hide title” appears on pages only by default.
Developers can extend support to other post types with the new genesis-title-toggle and genesis-breadcrumbs-toggle post type supports. To extend the “hide title” checkbox to posts as well as pages takes only one line of code, for example:
add_post_type_support( 'post', 'genesis-title-toggle' );
Genesis adds a ‘genesis-title-hidden’ body class to assist with CSS adjustments when a page title is hidden.
Developers can also remove one or both checkboxes if needed:
add_filter( 'genesis_title_toggle_enabled', '__return_false' ); add_filter( 'genesis_breadcrumbs_toggle_enabled', '__return_false' );
Support for custom logos
A new genesis-custom-logo theme support lets developers output a custom logo, improve site heading accessibility, and remove unneeded Customizer settings with minimal code. The theme support simplifies adding custom logos to your child themes and helps you to avoid some common traps.
Add support for Genesis custom logos like this:
add_theme_support( 'genesis-custom-logo', [ 'height' => 120, 'width' => 700, 'flex-height' => true, 'flex-width' => true, ] );
The parameters are the same as those for WordPress custom-logo support.
Adding logo support via Genesis in this simple way does four helpful things for your theme:
- Users will be able to change their site’s logo in the Customizer in the Site Identity section.
- Genesis will output the logo for you. You no longer need to add code to output the logo in your child theme.
- The Theme Settings → Header Customizer section will be removed to prevent confusion about where the site logo should be set. (This is the panel that contains the “Dynamic Title/Image Logo” select field.)
- Genesis will remove the link around the site title (the site logo already has a link). This prevents the site title from capturing keyboard focus when it is hidden with CSS once the logo is in use, reducing confusion and improving accessibility.
You can also prevent output of the custom logo if needed:
remove_action( 'after_setup_theme', 'genesis_output_custom_logo', 11 );
Introducing Genesis Starter Packs
Developers can now give Genesis child theme owners a choice of content variation during one-click theme setup.
What’s a Starter Pack?
A starter pack is a bundle of content, plugins, menus, and widgets that will be automatically imported and set up when someone clicks the “Install Pack” button.
Genesis Starter Packs give users a choice over the initial theme content and features that best suit their needs, without forcing them to choose between long lists of options and make many decisions during the setup process. Starter Packs also allow child theme developers to market one theme to multiple audiences.
Starter Packs for a single theme might differ greatly from each other, such as a “Shop”, “Blogger”, “Photographer”, and “Podcaster” pack that each offer different plugins and content for those users. Or packs can contain small differences only, such as a homepage variation.
How to try Starter Packs today
You can test Starter Packs now with the development version of the Genesis Sample child theme, available on GitHub. Or, grab the Genesis Sample development zip file.
Activate Genesis Sample to see a choice of starter packs, or visit Genesis → Child Theme Setup if the development version of Genesis Sample is already active.
How to build Starter Packs
Developers can create starter packs for Genesis child themes by amending their onboarding configs with a new starter_packs key. See an example of the starter packs config in Genesis Sample or in Revolution Pro.
The original one-click theme setup process will continue to be used and maintained. As a Genesis child theme developer using one-click theme setup, you can choose between offering one choice of content only, or using Genesis Starter Packs to give users a choice of pack.
Other improvements to one-click theme setup
Import widgets during one-click theme setup
Developers can now import widgets during the Genesis one-click theme setup process.
If your theme uses widgets, consider adopting this feature in time for the Genesis 3.1 release to give your users a smoother setup experience. You can see how we changed the Genesis Sample onboarding config file to enable footer widget import.
Improved access to the Getting Started page
If your theme supports one-click theme setup, Genesis 3.1 will add access to the Getting Started page from the Genesis admin menu at Genesis → Child Theme Settings if you need to run the setup process again.
Cleaner menu import
Individual menu items are no longer duplicated into an existing menu when repeating one-click theme setup. Instead, a new menu will be created.
Set the Primary Title H1 on static homepages
Genesis SEO users can now set the Primary Title H1 option at Customizer → Theme SEO Settings → Homepage on static homepages. This setting previously only worked on homepages that displayed your latest posts.
This lets you wrap your site title in an H1 element, rather than the page entry-title.
Theme developers should check that any CSS targeting homepage entry titles uses the .entry-title selector instead of the h1 selector. For example, if you have this in your theme CSS to target the static homepage title:
.custom-body-class h1 { … }
You should now use the entry-title class selector instead:
.custom-body-class .entry-title { … }
This ensures that titles continue to be styled correctly if someone sets the site title or description to use an h1 for their static homepage, which now makes the static homepage entry title use an h2. Users can hide the static homepage entry title with the new “hide title” Genesis page option if they wish.
Automatic removal of Genesis schema.org markup for Yoast SEO users
Yoast SEO now emits JSON-LD markup to help crawlers understand your site content. This can clash with similar structured data that Genesis outputs. Some Genesis users have installed Bill Erickson’s helpful Disable Genesis Schema plugin to remove Genesis microdata as a result.
Genesis 3.1 now removes Genesis microdata for you if you’re using Yoast SEO. You will be able to deactivate any microdata removal plugins after upgrading to Genesis 3.1 with the final release at the end of August 2019.
We thank Bill Erickson for providing his plugin while we refactored Genesis schema markup to selectively disable it more easily in this release.
Easy manual removal of Genesis schema.org markup
Developers can remove Genesis schema.org markup manually with one line of code if desired:
add_filter( 'genesis_disable_microdata', '__return_true' );
Genesis loves the WordPress REST API
Genesis features are now exposed to the WordPress REST API for the first time as part of support for Genesis options in the block editor.
The title toggle, breadcrumbs toggle, layout, and body and post custom classes are now exposed as post meta via the REST API posts endpoint:
> curl https://example.com/wp-json/wp/v2/posts/[id]
Developers can access a list of supported Genesis layouts for the active theme from the new genesis endpoint:
> curl https://example.com/wp-json/genesis/v1/layouts/site
This opens opportunities for developers building headless WordPress sites with Genesis, and aids integration with external applications and services.
We plan to expand Genesis support for the REST API, and will offer developer documentation for these features.
Tweaks and improvements
Genesis 3.1 continues to improve the codebase and development processes with:
- Improved adherence to WordPress coding standards and adoption of PHP features supported by PHP 5.6+.
- Refactoring of schema.org code and upgrade logic for better separation and maintainability.
- Improved processes for automation to help the StudioPress team lint and test new code with every commit. This means standards stay high as commits increase and contributors grow.
- Changes to the JavaScript build process to embrace React and the WordPress block editor.
- Improved generation of language files via WP-CLI so that labels in JavaScript code are now captured for translation.
Send feedback about Genesis 3.1 beta
Please help us test Genesis 3.1 before the full release later in August 2019. Then reach us here with your questions and suggestions:
- The GenesisWP Slack workspace is where the Genesis community and development team hangs out.
- The StudioPress account help page helps StudioPress customers send comments and feedback.
- The WP Engine Customer Portal lets you reach us if you’re a WP Engine account holder.
We hope you enjoy all the features and improvements that Genesis 3.1 brings to your WordPress sites.