You can extend the get_the_archive_title
filter which I’ve mentioned in this answer
add_filter('get_the_archive_title', function ($title) {
if (is_category()) {
$title = single_cat_title('', false);
} elseif (is_tag()) {
$title = single_tag_title('', false);
} elseif (is_author()) {
$title="<span class="vcard">" . get_the_author() . '</span>';
} elseif (is_tax()) { //for custom post types
$title = sprintf(__('%1$s'), single_term_title('', false));
} elseif (is_post_type_archive()) {
$title = post_type_archive_title('', false);
}
return $title;
});
Related Posts:
- Order posts (across the whole site) by metadata date
- Get list of years when posts have been published
- How to set default archive image without overriding first attached image? [closed]
- Pagination in relation to archive.php
- Function filter breaking tag archive menus
- How to display the_archive_title() and the_archive_description() – “weird” interaction
- Image loading function not working on archive.php template
- Overwriting TwentyTwelve template file with child theme template, but lower in the hierarchy
- Simplest Way to Build Custom Archives Page?
- Create a CUstom Archive by Year, but just for a Single Category
- Exclude specific post from query
- Changing author links on homepage to buddypress profiles – without affecting ability to link to author archive throughout the site
- Featured image on archive page based on post type
- Replacing term/taxonomy archive pages with search queries
- remove_action on after_setup_theme not working from child theme
- Remove type attribute from script and style tags added by WordPress
- How to get the image EXIF date/time and use it for the WP post date/time
- Programmatically Set First Image as Featured
- add_action in a function, is it possible?
- How to manually activate user in dashboard only by admin
- How to reduce original image quality on upload?
- In WooCommerce I need to modify the thankyou.php page [closed]
- Shortcode with parameters inside parameters
- When is wp_trim_excerpt() called?
- What is wrong with this Shortcode? I get it in a wrong place inside the content
- How do you completely remove the default header and footer using functions.php?
- Enqueuing Script in functions.php vs on the page
- Allowing SVG uploads in media uploader without plug-in
- Use is_product_category() properly
- Ajax call theme functions from front
- Show excerpt for only first post in query
- What does the author_nicename parameter do in get_author_posts_url()?
- Members only site – still need the lost password page accessible
- Load JS Script only for custom post types
- How to overwrite / extent wordpress function is_email
- WordPress upload_mimes not working for front-end uploads of 3D files
- Add caption functionality to custom WordPress theme
- List all-childpages on parent-page AND list child-pages on childpage itself but not the current one?
- Removing permalink from post thumb in twentyeleven
- Product object returns no sale price
- How to stop twenty fifteen theme from cropping featured images?
- meta tags doesnt fetch data from permalinks
- How to know if user logged in
- Option Tree integration of Custom CSS
- Remove “Published On” inside wp-admin
- Can’t call Javascript function – scope?
- Deprecated function get_user_by_email($email)
- Don’t display html if function returns nothing
- header_image() with CSS
- Shortcode parse error – wrong syntax
- Load custom css in functions.php causing library issue
- Why does get_template_directory_uri() not include “www”, only for enqueued stylesheets?
- Getting commenter meta
- In jquery use php variable to execute an enqueued jquery file
- Run a jquery script on on a certain template page
- Can’t add_action to ‘save_post’ and get it to fire
- why is this function firing on all child menu items as well?
- Custom styles in Tiny MCE with an external CSS file
- I changed Functions.php and now I get “cannot decode raw data NSURLErrorDomain:-1015” (not blank)
- How to load jQuery in TOP of wp_footer?
- How to fetch custom post type by variable date?
- How to make custom comment fields required
- two search forms on the same page
- Getting out side of wp root folder from function.php using absolute path
- How do I register a new settings page? [closed]
- Include Jquery libraries in wordpress theme?
- current_page_item is missing inside wp_nav_menu
- Change default upload images size for contributors
- Strange error from functions.php files (wp_register_script)
- Retrieve First Image Function
- file.php not loaded?
- How to setup a popup registeration page in wordpress with function.php
- Display ACF category image on archive and single template files
- How to get taxonomy tree ids without running expensive loops
- How to add if statement on WordPress shortcode output
- Auto delete content in specific folder inside media library
- Using get_terms for custom taxonomy in functions.php
- Why does modifying the “read more” link remove the link class?
- How to update an image attachment’s alt text from a custom field when saving a post?
- Woocommerce product price change
- Allow user only create specific tags
- Child theme remove parent filter in functions
- How to display different blocks for mobile and desktops
- Help wiht adding fullcalendar.io to a WordPress page
- WP Enqueue Script Error
- Enqueue JS + CSS via a child theme functions.php file?
- How to add publish/draft button in Admin Post Lists
- How to create a WordPress Customizer Button to Clear a Cache?
- Move product attributes after summary on single product page
- Javascript and Stylesheet in child page
- How to add number to wordpress count function?
- How do I integrate my Child Theme into a Custom Template?
- Sending Messages Back to the Template After Processing?
- Why are some custom javascript files working but some are not
- Custom Nested WordPress Comments with avatar
- using enqueue_script in a shortcode isn’t working
- Functions file mods and CPU
- How to overwrite ‘read more” text for artmag theme
- How to display milliseconds instead of seconds using timer_stop function? [closed]
- Filter to strip unnecessary attributes