fbpx

Filtering archive pages headings in WordPress 5.5

With WordPress 5.5, theme authors will now be able to easily filter archive pages headings, so they can use their own HTML markup.

The existing get_the_archive_title hook was previously limited to filter the whole title string used on archive pages. Some contributors pointed out that this filter was not specific enough to address all theme developers needs related to the archive pages headings.

In get_the_archive_title() this change splits the internal $title variable into $title and $prefix.

By using the new get_the_archive_title_prefix filter, the prefix can now be wrapped within custom elements or removed completely.

Basic examples

get_the_archive_title_prefix can be used to filter the archive pages heading prefix. It accepts

This post was originally published on this site

Work With Xiphos Web Marketing

No business is too small to succeed, thanks to online technology! From marketing, to customer service, to placing orders, to customer financing, there are tools that anyone can utilize. Let me, Nate Houstman, be your guide!

FINANCING AVAILABLE!

Pin It on Pinterest

Share This
Xiphos Web Marketing

FREE
VIEW