Support » Plugin: Email Address Encoder » Emails not encoded.

  • Resolved mairag

    (@mairag)


    Hello, I have several sites were this plugin is in use, but none of them have the emails encoded. I’m using Genesis Framework and different child themes on each. These email addresses are placed inside Pages and/or Text/HTML widgets, nothing too fancy.

    This is a footer Text widget: http://puu.sh/AUPh0/38f99fbb45.jpg
    This is the source code: http://puu.sh/AUPjf/8ee84cab3a.png

    I let one the sites here so you can check and maybe find what I’m doing wrong.

    Thanks in advance.

    The page I need help with: [log in to see the link]

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

    (@tillkruess)

    It’s working, checkout the raw page source. See FAQ.

    Thread Starter mairag

    (@mairag)

    Got it! Thanks!

    Hi,
    could you check my problem as well.
    Your plugin work perfectly, except custom link in footer menu section in wp theme-2017 v4.9.7.
    I’m adding custom link to the footer with mailto and you can see full email address (now I have some fake email test@test.com).
    here is the page link – https://viktoriasailing.me/
    thanks for help

    Plugin Author Till Krüss

    (@tillkruess)

    @bartekj: What theme are you using and is the footer widget part of that theme?

    Hi,
    I am using twenty seventeen and yes widget is a part of the theme.

    Plugin Author Till Krüss

    (@tillkruess)

    Ah, I see. The “Social Links Menu” is configured through a navigation menu, isn’t it? Could you send me a screenshot of the backend where you setup the links?

    here is screen https://postimg.cc/image/59tdoky07/
    it is in custom link and in the Menu Settings below display location is Social Links Menu

    Plugin Author Till Krüss

    (@tillkruess)

    You’ll have to manually encode navigation links in that case:

    
    add_filter( 'nav_menu_link_attributes', function ( $atts ) {
        $atts[ 'href' ] = eae_encode_emails( $atts[ 'href' ] );
        return $atts;
    });
    

    See if that works.

    hi,
    thanks for answer.
    Now it almost works.
    Now email is hidden but I don’t know why it change as well href string => mailto: to regular link http, and when I refresh page, some times it is link to my page and some times it works as expected?

    Plugin Author Till Krüss

    (@tillkruess)

    You gotta play with it a little bit. Maybe it’s the filter priority:

    
    add_filter( 'nav_menu_link_attributes', function ( $atts ) {
        $atts[ 'href' ] = eae_encode_emails( $atts[ 'href' ] );
        return $atts;
    }, 1000);
    

    Or maybe add an @-sign check:

    
    add_filter( 'nav_menu_link_attributes', function ( $atts ) {
        if ( strpos( $atts[ 'href' ], '@' ) !== false ) {
            $atts[ 'href' ] = eae_encode_emails( $atts[ 'href' ] );
        }
    
        return $atts;
    }, 1000);
    

    Hi,

    I have same problem, but none of the 3 codes work. Last one is most promising but it adds http before mailto and link is not correct.

    Best regards,
    Marko

    Plugin Author Till Krüss

    (@tillkruess)

    @marxveix: Have you considered using the premium version? It handles all links automatically without the need to figure out filters.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Emails not encoded.’ is closed to new replies.