ACF Field value in wordpress login message filter


I am trying to add a custom message after the WordPress logo on the WordPress login form, I am using the ACF field on the home page to echo the value on the WordPress login page, I have mentioned the code, any help?

function alltomhobby_login_message( $message ) {
    if ( empty($message) ){
        $logintext = the_field('login_text');
        return $logintext;
    } else {
        return $message;

add_filter( 'login_message', 'alltomhobby_login_message' );
Waleedviews 4 months 0 Answers 25 views 0

Leave an answer