Skip to main content

Displays the excerpt of the current post after applying several filters to it including auto-p formatting which turns double line-breaks into HTML paragraphs. It uses get_the_excerpt() to first generate a trimmed-down version of the full post content should there not be an explicit excerpt for the post.

The trimmed-down version contains a ‘more’ tag at the end which by default is the […] or “hellip” symbol. A user-supplied excerpt is NOT by default given such a symbol. To add it, you must either modify the raw $post->post_excerpt manually in your template before calling the_excerpt(), add a filter for ‘get_the_excerpt’ with a priority lower than 10, or add a filter for ‘wp_trim_excerpt’ (comparing the first and second parameter, because a user-supplied excerpt does not get altered in any way by this function).

See get_the_excerpt() for more details.

An auto-generated excerpt will also have all shortcodes and tags removed. It is trimmed down to a word-boundary and the default length is 55 words. For languages in which words are (or can be) described with single characters (ie. East-Asian languages) the word-boundary is actually the character.

Excerpts provide an alternative to the use of the <!–more–> quicktag. Whereas this more tag requires a post author to manually create a ‘split’ in the post contents, which is then used to generate a “read more” link on index pages, the excerpts require, but do not necessarily demand, a post author to supply a ‘teaser’ for the full post contents.

The <!–more–> quicktag requires templates to use the_content() whereas using excerpts requires, and allows, template writers to explicitly choose whether to display full posts (using the_content()) or excerpts (using the_excerpt()).

The choice of whether to display a full post or an excerpt can then be based on factors such as the template used, the type of page, the category of the post, etcetera. In other words, with a <!–more–> quicktag the post author decides what happens, whereas the template writer is in control with excerpts. Moreover, although <!–more–> can be used to create a real split using the $stripteaser parameter, it would be hard and complicated to then differentiate based on characteristics, causing this to become a basically site-wide choice.

wide

Hybrid Core comes with a custom-built media grabber. It allows you to pull video, audio, and gallery embeds directly from the post content. This is useful for displaying featured media for a post and is a perfect compliment to WordPress post formats.

The Layouts API is a system for handling layout options (e.g., left vs. right sidebar). Theme authors can register any number of layouts and have them automtically shown in the customizer for user selection. Per post/term layouts are possible too.

Core WordPress allows you to register and enqueue both scripts and styles. The font loader takes that a step further and allows you to do the same for fonts. By default, there’s built-in support for both Google Fonts and fonts bundled with the theme.

The attributes system is like WordPress’ body_class() and post_class() It’s works with any HTML attribute on any HTML element. There are built-in filter hooks and no limitations on how you can customize it.rom template-parts to post templates to the template hierarchy, Hybrid Core has it all. Don’t let WordPress’ default template system pigeon-hole you into an irratiorom template-parts to post templates to the template hierarchy, Hybrid Core has it all. Don’t let WordPress’ default template system pigeon-hole

From template-parts to post templates to the template hierarchy, Hybrid Core has it all. Don’t let WordPress’ default template system pigeon-hole you into an irrational structure because of weird, legacy support. Build and structure templates your way.

Leave a Reply