---
title: Change “Detect Current Location” button text
description: "PHP ``` function lpac_change_btn_text( $default_text ){ return \"Custom Button Text\"; } add_filter( 'lpac_find_location_btn_text', 'lpac_change_btn_text' ); ```"
url: "https://lpacwp.com/docs/how-to-change-detect-current-location-button-text/"
updated: "2023-09-19"
category: Custom Code Samples
---

# Change “Detect Current Location” button text

PHP

```
function lpac_change_btn_text( $default_text ){
	return "Custom Button Text";
}
add_filter( 'lpac_find_location_btn_text', 'lpac_change_btn_text' );
```
