You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, calls to the_title() or get_the_title() return Archived: [post-title] for archived posts. It would be nice to be able to disable or change that prefix with a single line of code, or for there to be a filter for changing the label.
For anybody looking to do this now, the following WordPress filter function also works to accomplish this:
The separator is the string between the "Archived" label and the post title, including spaces. When the label appears before the title, the separator is a colon and space : , if the label is placed after the title it is a dash with spaces on each side -.
You can customize the separator with the following filter:
add_filter( 'aps_title_separator', function( $sep ) {
$sep = ' ~ '; // replace with your separator
return $sep;
});
By default, calls to
the_title()
orget_the_title()
returnArchived: [post-title]
for archived posts. It would be nice to be able to disable or change that prefix with a single line of code, or for there to be a filter for changing the label.For anybody looking to do this now, the following WordPress filter function also works to accomplish this:
The text was updated successfully, but these errors were encountered: