If you’ve written a child theme for Twenty…

If you’ve written a child themeChild theme A Child Theme is a customized theme based upon a Parent Theme. It’s considered best practice to create a child theme if you want to modify the CSS of your theme. https://developer.wordpress.org/themes/advanced-topics/child-themes/. for Twenty Fifteen, please note that some of the new pagination functions have been renamed for a bit of clarity:

  • the_pagination() is now the_posts_pagination()
  • get_the_pagination() is now get_the_posts_pagination()
  • These two functions now emit a “posts-navigation” HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. class, instead of “paging-navigation”

@obenland‘s original post on new template tags in WordPress 4.1 has been updated with these changes.

#4-1, #bundled-theme, #dev-notes, #twentyfifteen

New Template Tags in 4.1

Working on a new default theme is always an opportunity to improve coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.’s Theme APIs too. With the release of Twenty Fifteen there are quite a few improvements that made it in:

Archive Template Tags

Theme authors get to use four new functions to use in their archive templates:

  • get_the_archive_title() and the_archive_title() for returning/displaying the title of the current term, date, post type, post format, or author archive.
  • get_the_archive_description() and the_archive_description() for returning/displaying the description associated with the current term archive.

They are especially handy when a theme doesn’t have dedicated templates for taxonomyTaxonomy A taxonomy is a way to group things together. In WordPress, some common taxonomies are category, link, tag, or post format. https://codex.wordpress.org/Taxonomies#Default_Taxonomies. or date archives, but can essentially be used in all archive templates. The description functions only display term descriptions, since no other archive type really offers descriptions.

Worked on in #21995 and then introduced in r30223.

Navigation Template Tags

Core has provided template tags for links between posts and pages of posts for a long time. Now theme authors can resort to higher-level template tags to display an entire navigation snippet. If you’ve built your themes off of recent default themes, or created child themes from them, these should look very familiar. As a heads up: Since default themes have been developed in HTML5 for five years now, there is no HTML4 version of these tags.

  • get_the_post_navigation() and the_post_navigation() for navigation to the next and previous post.
  • get_the_posts_navigation() and the_posts_navigation() for navigation to the next and previous page of posts.
  • get_the_posts_pagination() and the_posts_pagination() for paginated navigation between pages of posts. (Updated for 4.1 RC1, see this post)

All functions use the same wrapping markup with semantic class names, so it’s easy to style them in one go. The navigation functions accept custom link texts and screen-reader-texts, in case the defaults are not applicable. The pagination functions even accept all arguments that paginate_links() does, too! (Except for the 'type' argument, we need that to be plain so the template tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) doesn’t break 😉 )

Worked on in #29808, introduced in r30065, improved in r30457.

Also in 4.1:

Theme Support for Title Tags

I’ve written about title tags before and will refer to that post for more information about the groundbreaking changes that happened here.

Page Template Body Classes

They got a minor update that simplifies those class names and allows theme authors to target folders of page templates. With this /page-templates/full-width.php will produce page-templatepage-template-page-templates, page-template-full-width and page-template-page-templatesfull-width-php. Worked on in #23470 and then introduced in r30100.

#4-1, #bundled-theme, #dev-notes, #themes, #twentyfifteen

Title Tags in 4.1

For over three years we have been trying to make it easier for plugins and themes to manage the document title. Kubrick didn’t necessarily set a great example to theme authors by appending the blogblog (versus network, site) name to wp_title(), a practice we have been trying to correct ever since.

#18548 was created to find a solution to that problem, but after initial excitement hasn’t seen any noteworthy action until a few weeks ago. Yesterday @johnbillion committed a first step towards a brighter future in [30074], introducing a forward compatible way to make document titles fully customizable.

Adding titles to themes

Starting with 4.1 and Twenty Fifteen, the recommended way for themes to display titles is by adding theme support like this:

function theme_slug_setup() {
   add_theme_support( 'title-tag' );
}
add_action( 'after_setup_theme', 'theme_slug_setup' );

Support should be added on the after_setup_theme or init action, but no later than that. It does not accept any further arguments.

By declaring support like this, themes acknowledge that they are not defining titles on their own and WordPress can add it safely without duplication.

To maintain full forward compatibility, plugins can not check for theme support of title tags, and are discouraged from building functionality around it just yet. The long term plan is to enable users to manage document titles from their adminadmin (and super admin), independent of which theme they’re using. At that time it will also become more pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party friendly. To make sure this can be achieved however, it was important to rule out backwards compatibility concerns as much as possible.

While there is no consensus on how the final implementation will look like yet, this should be a good way to get themes started to opt into a more user friendly way. It will also make any future changes that much more impactful when the final version ships.

Backwards compatibility

To enable support in existing themes without breaking backwards compatibility, theme authors can check if the callback function exists, and add a shiv in case it does not:

if ( ! function_exists( '_wp_render_title_tag' ) ) :
	function theme_slug_render_title() {
?>
<title><?php wp_title( '|', true, 'right' ); ?></title>
<?php
	}
	add_action( 'wp_head', 'theme_slug_render_title' );
endif;

This would also be the place to optionally add a filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. to enhance the document title, along the lines of what recent default themes have been doing.

#4-1, #bundled-theme, #dev-notes, #themes, #twentyfifteen

Twenty Fifteen Chat Summary October 28

Notes for our weekly chat about Twenty Fifteen:

Twenty Fifteen continues to feel pretty robust — thanks to everyone who’s been testing the theme, reporting bugs, and contributing to patches with code or comments. We’re in good shape.

The biggest change in the past week for a lot of people will have been the closing of #29979. Scrollbar is no longer a plural in Twenty Fifteen. 🙂

We’ve also had lots of great accessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) improvements.

In todays weekly chat we reviewed the remaining tickets for the theme. We’ve entered a phase of cleanup and nice-to-haves, with one remaining blocker, activation in older versions of WordPress. We’ll follow the lead of previous default themes with a back compat check.

CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings.-related tickets that could use more eyes:

#bundled-theme, #twentyfifteen

Twenty Fifteen Chat Summary October 21

Notes for our first weekly chat about Twenty Fifteen:

We started off our office hours for today precisely right on the minute — one hour early. Apologies to anyone who missed the chat time. Maybe we were too eager to chat about Twenty Fifteen.

Twenty Fifteen is in great shape right now but we still need bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. finders and patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. testers/contributors to help us make this the best default theme yet. Right now, our biggest priorities are mobile, accessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility), and the big ticketticket Created for both bug reports and feature development on the bug tracker.: double scrollbars.

Our big ticket right now, the blockerblocker A bug which is so severe that it blocks a release., is #29979 — the double scrollbar. The more eyes we have on this ticket the better. The goal is a fixed sidebarSidebar A sidebar in WordPress is referred to a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or any where in the theme., only when the height is just right for it. When the height isn’t right, it should scroll with the content.

It would be great to have some help with #29980.

The accessibility team has done a great review of Twenty Fifteen. (Thanks!) Our top priority right now is to make sure we have those tickets prioritized and in tracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress.. @davidakennedy is going to lead the charge with getting those tickets in.

@davidakennedy and @karmatosed will be continually looping the a11yAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) and theme review teams into Twenty Fifteen testing and development.

We also chatted about Sass and determined that the discussion around shipping Sass with a default theme will be best to have ahead of, and for, Twenty Sixteen. Let’s decide to do it, if we do it, then. It doesn’t seem like it would have helped with any of the tickets so far, and even including it for development at this time is one more feature to keep track of at this point. There’s no ticket for it yet, but including it will be a wontfixwontfix A resolution on the bug tracker (and generally common in software development) that indicates the ticket will not be addressed further. This may be used for acceptable edge cases (for bugs), or enhancements that have been rejected for core inclusion..

The chat log is here. Join us weekly in IRCIRC Internet Relay Chat, a network where users can have conversations online. IRC channels are used widely by open source projects, and by WordPress. The primary WordPress channels are #wordpress and #wordpress-dev, on irc.freenode.net., Tuesdays at 15:30 UTC.

#bundled-theme, #twentyfifteen

Twenty Fifteen is in /trunk!

twenty-fifteen

With r29892 the first pass at our new default theme, Twenty Fifteen, is in coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. While a lot of hard work has gone into it already it won’t be complete without your help. Check it out and do your best to twist it, bend it, and break it everywhere you can — especially on your favourite and least favourite mobile devices. Every tester, and every ticketticket Created for both bug reports and feature development on the bug tracker., helps get us closer to an amazing theme for 2015.

If you’d like to help out with fixing some of those bugs in all those tickets, patches welcome. 🙂 And we’ll be going over everything Twenty Fifteen in IRCIRC Internet Relay Chat, a network where users can have conversations online. IRC channels are used widely by open source projects, and by WordPress. The primary WordPress channels are #wordpress and #wordpress-dev, on irc.freenode.net., every Tuesday at 15:30 UTC, in #wordpress-dev. Come hang out with us and squash some bugs.

#bundled-theme, #twentyfifteen

Twenty Fifteen

It’s that time of the year again, time to work on a new default theme!
This year we’re back to creating a brand new design. Like Twenty Fourteen, this is being targeted for December and thus WordPress 4.1.

@matt asked Takashi Irie to design Twenty Fifteen, and they are both closely collaborating with @iandstewart, who also worked on Twenty Ten and Twenty Eleven. The design is far from finished, but the following screenshots might give you an idea of what direction it is headed this year:

Twenty Fifteen is a clean, blogblog (versus network, site)-focused theme designed through simplicity. With careful attention to typography, the theme treats text as a major part of the user interface. It features Google’s Noto Serif and Sans – a font family designed to be visually harmonious across many of the world’s languages, and a perfect fit for the internationalization strides being made in WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress..

The theme is also designed to maximize the impact of core’s customization tools – Custom Headers and Custom Backgrounds. These tools will allow any Twenty Fifteen blog to be easily personalized.

Last but definitely not least, Twenty Fifteen uses a mobile first approach in its design, remaining attractive and focusing on an optimal browsing experience across a wide array of devices from mobile to widescreen desktops.

All of these things come together to present content cleanly for any of Twenty Fifteen’s users – a simple default theme.

—Takashi Irie

Next steps will be to finish the design, create a working theme, commit that to core, and then break it and make sure it adheres to the high standards and expectations we all have for default themes.

If you are interested in contributing, please subscribe to this blog (if you haven’t already), and leave your name in the comments. As soon as it’s ready for public breaking, testing, and patching, I’ll make sure you get a pingPing The act of sending a very small amount of data to an end point. Ping is used in computer science to illicit a response from a target server to test it’s connection. Ping is also a term used by Slack users to @ someone or send them a direct message (DM). Users might say something along the lines of “Ping me when the meeting starts.”!

Further reading:

#4-1, #bundled-theme, #themes, #twentyfifteen