You have the wrong values , you can’t use ←
, instead use the right encoding which in that case is ←
and also %s
for the title.
Also you only want this to run on two pages.
function back_to_site_text( $translated ) {
if ( in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) ) )
$translated = str_ireplace( '← Back to %s', 'Head back to My Site', $translated );
return $translated;
}
add_filter('gettext', 'back_to_site_text');
Related Posts:
- Check if page parent has certain template
- Handling Body class based on Template
- WordPress Gravatar filter is removing my custom attributes
- Generating an nonce for Content Security Policy and all scripts – How to make it match/persist for each page load?
- How to have different site identity logos on each page on Astra Theme [closed]
- Must filter functions receive all arguments passed to them?
- Assign new post author IF another user in custom field on post transition
- Is there a hook that I can use when a fatal error occurs?
- Run a filter when a walker runs
- Randomise upload filenames (or another solution to hide the original image URL from theft?)
- Get_avatar filter?
- Add a class to the anchor tag on HTML5 gallery
- add_action shortcut?
- Login/logout in header
- How can I remove a function that has been added to wordpress with add_filter?
- How to control WordPress image metadata (using Imagick)?
- Edit incorrect password message WordPress
- How do I add custom bulk actions to multiple custom post types?
- Add data attribute to each li in menu
- Contact Fom 7 – how to add custom HTML inside span.wpcf7-form-control-wrap AND IMMEDIATELY AFTER input.wpcf7-form-control?
- Removing “wpautop” (auto tags) only on certain pages?
- Woocommerce: hook action/filter I could use to add variation id and price with each attribute opt on WooCommerce Rest api
- Why ajax doesn’t work on certain wordpress hooks?
- Remove a div from RSS feed
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- Print last modified date only on posts
- How to add an arrow to menu items has submenus
- Error in custom php function doesn’t exist
- Return a numerical function value in Customizer controls
- getting logged in user info (wp-load.php) from parent directory
- Unique icons next to each WordPress menu item
- Modify custom field input data before creating a new post
- how to make custom ajax handler?
- Problem with login form
- Log in / Log Out Custom Button
- Alter required message using comment form api
- Add item to top of menu using a filter in functions.php
- Should `wp_login` be used since it’s deprecated?
- How to display login form anywhere, when user isn’t logged in, without redirecting?
- How to make modifications only to certain elements of an HTML string on the server-side?
- Override a function defined in wp-includes/comment-template.php
- Omit custom post type from wp-sitemap.xml based on meta key using wp_sitemaps_posts_query_args
- Run a code only on theme activation only during first activation
- Filtering a function’ output for a new continued function
- Deleting Certain terms from appearing on the front end as links
- Theme not calling Jquery properly
- Content filter won’t work
- WordPress redirect redirecting too many times or not at all
- Why does the post_type_link hook everything twice?
- Warning: in_array() null given in PHP function
- Upload multiple files in randomly generated folder using wp_upload_bits
- Create page template via functions.php?
- Add meta tags to a custom header
- How can I hook into the wp_mail function used by BackWPup?
- Get user custom field value on function.php
- Custom query vars filters problem with pagination
- Adding function to child theme’s function.php
- Get the name of menu item with wp_nav_menu
- How to add aria role and schema markup to custom walker container
- Creating customized php files in theme folder
- Dynamically Generate Functions and Hooks
- How to pass hook variable to function?
- User filter posts by year
- How to sort WooCommerce products page by latest in-stock items first?
- Filter wordpress posts without searching the keywords in the post content
- Variation prices breakdown only for single product page
- Removing “There is no account with that username or email address.” error message in “/wp-login.php?action=lostpassword”
- How do I add a function to parent theme
- Can’t log in to WordPress wp-admin after adding code to functions.php
- How to remove get_header From all single pages in wordpress with functions.php without plugin?
- Contain multiple page templates in one PHP custom template file in WordPress?
- Wp_Schedule_Event every few minutes doesn’t work
- Apply function.php filter only if url not has /amp/
- Adding custom field to product category and show it to shop/category shop page
- Change lost password url to a mailto URL in WordPress
- Remove span tags from WooCommerce Downloads page
- Having trouble creating two shortcodes, one for logged in user and one for visitors
- How to edit post meta data before publishing the post it self wordpress?
- Restrict wordpress access to logged users only
- Fatal error: Uncaught Error: Class ‘WP_Block_Styles_Registry’
- Custom meta box is not displaying value showing tag as empty
- using filter and hook inside class
- Discount in the specific product title using keyword ( Woocoommerce )
- Menu not updating for logged in users after redirect
- How to bind each “the_content” elements to a custom variables
- how to use auth_redirect() redirect visitor to login page if they are not login when they click account and order page?
- How do I get the value of a current user’s custom field?
- Reload page with a different shortcode when a user selects from a dropdown
- Refresh page after login with litespeed cache
- WordPress Ajax filter: Create two loops for different output styles?
- add_filter() inside another add_filter()
- Need help with AJAX login to call php in functions.php to handle redirects based on user cap (role)
- Redirecting the lost password page request when using a custon login page
- Hook into all password resets in WordPress and get password before hashing?
- Custom Bulk Actions handler not firing
- is_user_logged_in() not working in homepage
- Getting page / post URL on publish and / or update
- How to generate customized filtered output for the gallery
- Add class to all meta boxes for a custom post type
- Fatal error when using array_diff() function inside of wp_update_nav_menu hook?