Changing the Edit Entry page title

Let's say you are building a Members directory, and you want to change the title of the Edit Entry page from "Edit Entry" to "Edit Profile", here's how to do it:

/**
 * Change the Edit Entry displayed title. In this example, change it to "Edit Profile"
 * 
 * @param string $previous_text The title before being modified
 */

add_filter( 'gravityview_edit_entry_title', 'gk_change_edit_entry_title', 10, 1);
function gk_change_edit_entry_title( $previous_text = 'Edit Entry' ) {
	return 'Edit Profile';
}

Before:

After:

Changing the title for multiple Views

add_filter( 'gravityview_edit_entry_title', 'gk_change_edit_entry_title', 10, 1);
function gk_change_edit_entry_title( $previous_text = 'Edit Entry' ) {
	$view_id = GravityView_View::getInstance()->getViewId();

	if($view_id == 8){
		$title = 'Edit Profile';	
	}
	if($view_id == 60){
		$title = 'Edit Team';	
	}
	return $title;
}
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us