Support » Plugin: Email Address Encoder » Email Address Encoder – Advanced Custom Fields values

  • Resolved frc_wordpress

    (@frc_wordpress)



    Hi ,
    I need some help regarding to encode an email address in my website .
    I look for some FAQ in support page but didn’t find any topic useful to solve my case.

    So far the plugin its working in all the website except in costume fields .
    I’m using this code syntax in the footer :
    eae_encode_emails( my_theme_get( ‘copyright-text’ ) )

    for some parts of the website works fine but with costume fields its not working properly .

    I have for example this code :

    <?php the_field(’email_r’,$PageId); ?>

    In order to encode the email I’m trying to do this :

    <?php eae_encode_emails( the_field(’email_r’,$PageId));

    ?>

    But so far its not working .

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    Hey!

    You’re almost there. The problem is that the_field() doesn’t return data, it prints it. Switching to get_field() and adding an echo should do the trick:

    
    <?php echo eae_encode_emails( get_field( 'email_r', $PageId ) ); ?>
    

    Let me know if that helps!

    • This reply was modified 3 weeks, 4 days ago by  Till Krüss.

    Thanks , It works !

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.