Change the account settings page title

Simple question:

How can I modify the word “Settings” only on the block layout to say “Main Profile Settings” but leave the left navigation alone. Using Loco translate changes the text everywhere and I just want to put some custom stuff on this page.

Thanks,
Tom

Hi,

Please try this PHP snippet:

add_filter(
 'hivepress/v1/routes',
 function( $routes ) {
  if(!isset($routes['user_edit_settings_page'])){
   return $routes;
  }
  
  $routes['user_edit_settings_page']['title'] = 'Custom title here';

  return $routes;
 },
 1000
);

add_filter(
 'hivepress/v1/menus/user_account',
 function( $menu ) {
  if(!isset($menu['items']['user_edit_settings'] )){
   return $menu;
  }
  
  $menu['items']['user_edit_settings'] = array_merge($menu['items']['user_edit_settings'], [
   'label'  => hivepress()->translator->get_string( 'settings' ),
  ]);

  return $menu;
 }
);

Please note that it can require further customization.
If customizations are required for your site, please try customizing it using the collection of code snippets Search · user:hivepress · GitHub and other developer resources, or consider hiring someone for custom work https://fvrr.co/32e7LvY

Thank you worked like a charm!