You need to add the actual page title back in. Try this:
add_filter( 'get_the_archive_title', function ( $title ) {
if( is_category() ) {
$title="Department: ". single_cat_title( '', false );
}
return $title;
});
Related Posts:
- How do I display the “Archives” widget layout (sidebar) in WordPress by ‘year’ then by ‘months’?
- Archive page doesn’t work
- How do I build a post_thumbnail based archive? [closed]
- How to override p2 breathe theme plugin in content template file?
- Custom Post Type Query issue
- next_posts_link and previous_posts_link problem
- Create a category archive page in TwentyTen Child Theme
- Is there a template tag I can use to link to the archive page corresponding to the month that a post was published on?
- Designing a custom archive.php inspired by the Autofocus theme
- Archives and Categories in Custom Menu
- Second page of archive is empty
- When to use _e and __ for the translation?
- Making update notification functionality for my themes
- With WordPress themes, where do I store the images and files relatively?
- Should `get_template_directory_uri()` be escaped?
- Best practice for including plugins as part of a theme?
- How to disable 3.1 “Admin Bar” via script for the admin user?
- Where do I find the functions triggered within a hook?
- two tinyMCE editors in the same page
- How to Change CSS Variable value in Theme Customizer Live Preview
- Pagination & get_pages?
- index.php is not loaded for single posts
- Easy WordPress theme creation tutorial? [closed]
- How do I add a post to a menu
- how to implement wp_is_mobile on themes?
- Where is definied the theme location for the main menu in a WordPress template?
- How to disable automatic colors in the Twenty Twenty theme?
- Check if user has enrolled in Sensei LMS Course on Lesson Page
- How to handle custom form submission?
- menu behavior is not as expected
- My custom theme does not load the translations
- Part of Menu Item Hidden on Header Menu
- Child theme style.css versioning
- Disable front-page.php template
- Gutenberg – editor-font-sizes in functions not working
- Same ACF on two different pages
- How to use get_template_part instead of include_once?
- How to remove comment link title attribute?
- Custom Field returning Numerical Value for Image rather than URL
- which is the best way to customize nav-menu-template.php?
- Should we use ob_start() in WordPress short code
- Default string not appearing want to translate
- How to make a local cache of mshots images
- Using a page as home, how do I prevent nav from setting both home and page links active?
- 2 localizations inside a WordPress theme
- Warning: A non-numeric value encountered in theme functions.php
- How can I ping update-core.php with a script?
- loading blank white screen of slide
- Child Theme’s style.css not loading in mobile browser
- 3 Level Deep Navigation Menu Not Showing All Levels
- Broken theme, template is missing
- WordPress page/blog incorporated into static website
- wp_enqueue_script not working?
- How to reverse engineer the Twenty Eleven background image uploader?
- Theme Development -> Specific Homepage
- Premium theme licensing of php called through AJAX
- is_single() works in plugin, not in theme?
- HTML block gutenberg templates
- Use a filter on menu items that have children
- Customizer: get_preview_url() inside customize_save_after hook
- How to add custom meta box when you have a custom page template file
- Password protect a custom template
- Theme Check errors of theme code
- New to WordPress – Read the Codex, Other Docs; Still Confused
- Style first 3 posts differently with WP_Query [duplicate]
- Does wordpress add their own classes into nav menus?
- Post archives link yields a 404 Not Found
- is_front_page use in sidebar.php
- matisse theme show excerpts not whole content
- My custom taxonomies are not showing up in the admin menus
- Let user to upload multiple time
- get main URL from subdirectory with php
- How to add custom theme in hosting server?
- Infinite loop when nesting have_posts()
- WordPress Custom Theme : Theme Builder vs ACF vs Gutenberg
- Is_single not working properly in genesis
- Debugging slow WordPress Theme Customizer (Any option similar to Query Monitor)?
- Code showing in wordpress post titles around website
- register_theme_directory() sees custom themes directory, but blank frontend
- how to call options on front end and add logo
- Jetpack Infinite Scroll Not Working
- After WP 4.6.1 Update , Blog page started giving 500 error
- How to show children pages as array
- How to share posts (and plugins) between existing site and new, separate dev/test installation?
- Menu order of parent menu from perspective of child menu
- Theme customizer live preview JS- Trying to bind to an html image url without luck
- How do I keep images in posts below a certain size without editing the post?
- Theme options not displaying correctly after theme update
- Multiple Content Shortcodes
- Is it possible to customize the layout of Gallery Shortcode?
- How can i use archive.php for indexing wordpress default posts?
- Add the ability of changing background color of a theme [closed]
- How to use esc_attr__() function properly to translate a variable that contains string?
- What to do when child theme is out of date with parent theme
- Purchased Theme to Custom Made Theme? [closed]
- How to make website with many template that active [closed]
- Query for tag given slug
- Image Size wrong during upload
- How to send async emails in wordpress?
- Is there any halfway decent documentation on the wp.media JS class?