15 thoughts on “How to Hide the Archive Title Prefix in WordPress Leave a comment

  1. Hi,
    Thanks for the post – exactly what I am looking for.

    You say to save the file and upload to your site. The plugin installer expects a zip file. How or maybe where do I upload this file?


    1. You can zip the file and upload that through the plugin uploader, or you can upload it via ftp to /wp-content/plugins/

    1. Sorry to hear that. You’ll have to ask the theme devs. They must be doing something custom with the category title.

      I’ve not used Astra before so I can’t help unfortunately.

    1. Do you have a copy of your function? You can stick it on gist.github.

      From the html it looks like the code I posted has been edited and the colon has been put in a separate span so it’s being displayed. If it was in the screen-reader-text span then it would be hidden.

  2. Thanks for this tip !
    BTW, the ticket has been implemented in July 2020
    Thee solution is straightforward: add the following function call in your theme XX_filter_archive_title
    add_filter( ‘get_the_archive_title_prefix’, ‘__return_empty_string’ );

    In chaplin

    if ( ! function_exists( 'chaplin_filter_archive_title' ) ) {
    	function chaplin_filter_archive_title( $title ) { (..) }
    	add_filter( 'get_the_archive_title', 'chaplin_filter_archive_title' );
            add_filter( 'get_the_archive_title_prefix', '__return_empty_string' );

Leave a Reply

Your email address will not be published.