[wp-trac] [WordPress Trac] #45955: Twenty Nineteen: get_the_archive_title filter issues
WordPress Trac
noreply at wordpress.org
Sat Jan 12 05:36:49 UTC 2019
#45955: Twenty Nineteen: get_the_archive_title filter issues
---------------------------+-----------------------------
Reporter: taskotr | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version:
Severity: normal | Keywords: dev-feedback
Focuses: |
---------------------------+-----------------------------
I was testing the theme with a plugin that adds a custom post type and
allows to set a custom title for the custom post type archive view using
the following filter:
{{{
add_filter( 'get_the_archive_title', 'slug_set_the_archive_title' );
}}}
While this filter works fine in the previous WordPress themes, such as
Twenty Seventeen, Twenty Sixteen and Twenty Fifteen, it does not work in
Twenty Nineteen.
It's possible to fix it by setting a priority parameter in the filter. For
example:
{{{
add_filter( 'get_the_archive_title', 'slug_set_the_archive_title', 99 );
}}}
The problem is that it breaks a header style, meaning the title will have
the style of the archive view prefix text (grey color and serif font
style).
Any idea what is the better way to use this filter in the
Twenty Nineteen theme?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45955>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list