Here is the simple PHP snippet which will replace the “Beaver Builder” text in all places with your custom text. Put the following PHP code into your theme’s functions.php file. I use the custom text “Paul Builder” in the code. You will replace it with yours one.
gettext
How to change the "View Listing" text – AgentPress Listings Plugin
Lot of users are asking this question: How to modify the “View Listing” text?. Very simple way you can change the text. Just drop the following code in your functions.php file and see the magic.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
add_filter( 'gettext', 'agentpress_change_view_listings_text', 20, 3 ); /** * Change view listings text. * * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext * @see switch http://php.net/manual/en/control-structures.switch.php */ function agentpress_change_view_listings_text( $translated_text, $text, $domain ) { if ( ( 'agentpress-listings' == $domain ) || ( 'agentpress' == $domain ) ) { switch ( $translated_text ) { case 'View Listing' : $translated_text = __( 'Modified Text', 'agentpress-listings' ); break; } } return $translated_text; } |
“View Listing” text is replacing with “Modified Text”. Explain: Code is using the WordPress’s gettext() filter. This filter hook… Continue Reading