Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Title “Archives: Forum” – change to read “Forums”?

@torimc125

Participant

Thank you, Robin, for your reply. I downloaded Code Snippets and I added the above line, you provided, wp-content/themes/%your-theme-name%/functions.php. I changed %your-theme-name% to my theme, but I receive this fatal error.

Don’t Panic
The code snippet you are trying to save produced a fatal error on line 1:
syntax error, unexpected end of file

Was I supposed to add the below to code snippet?

add_filter( ‘get_the_archive_title’, ‘to_archive_title_remove_prefix’ );
function to_archive_title_remove_prefix( $title ) {
if ( is_post_type_archive() ) {
$title = post_type_archive_title( ”, false );
}
return $title;
}

Skip to toolbar