Support » Plugin: WP Mailto Links - Protect Email Addresses » Remove a page from protection – what am I doing wrong?

  • Hi,

    I want to remove email protection from one of my pages, and I entered the code in my functions.php and I _think_ I put the ID of the page in the right place – but nothing happens. I still see *protected email*

    The ID of the page is 2306, so my code should look like this, right?

    function special_mailto($link, $display, $email, $attrs) {
        global $post;
        $exclude_pages = array(2306);
        if (in_array($post->ID, $exclude_pages)) {
            // use html entity to prevent replacing email by protection text
            return str_replace('@', '@', $email);
        return $link;
    add_filter('wpml_mailto', 'special_mailto', 10, 4);

    Help would be appreciated. Thank you.

Viewing 1 replies (of 1 total)
  • Actually, something has happened – I see *protected email*, but I can’t even click on that text to make a new email. It’s just text. On the rest of my pages, it is a link.

Viewing 1 replies (of 1 total)
  • The topic ‘Remove a page from protection – what am I doing wrong?’ is closed to new replies.