• jklyn

    (@jklyn)


    Hello,
    I’ve created the custom post type ACTIVITY. When I click to my ACTIVITY page, it’s dislayed as: Archive: Activity. I can’t remove the text ‘Archive:‘ from my archive.php page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • ThemeSumo

    (@themesumo)

    It’s more than likely within a function, the location of which could be anywhere, it depends on which theme you’re using.

    What code is displayed within your archive.php where the title would be?

    mrtasken

    (@mrtasken)

    Try adding this filter:

    add_filter('get_the_archive_title', function($title){
    	if( is_archive() ){
    		$title = post_type_archive_title( '', false );
    	}
    
    	return $title;
    });

    It worked for me!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to remove Archive: text from archive.php of a custom post type?’ is closed to new replies.