Support » Plugin: WP No External Links » Mask in Custom fields?

  • Resolved devrekli


    Hello. I tried many auto nofollow plugins including wp-noexternallinks . But its not working in my custom fields.

    my custom fields name= downloadurl

    I’ve read it but I do not understand. which file? what line? what code should be written? Can anyone help me? thanks

    How can I mask links in custom field?

    You will have to add just a line in theme code where you output custom field data.
    To add same preprocessing for data as for comment text, use
    For example, if you use some kind of metadata, it should look like this:
    $metadata = get_post_meta($id, ‘MetaTagName’, true);// get data from wordpress database
    $metadata=apply_filters(‘comment_text’,$metadata);// add this line of code for preprocessing field value
    echo $metadata;//output preprocessed field value

    That’s if you want to mask links in custom field like in comments text. Use “the_content” instead of “comment_text” if you want to use the same masking policy as for post text.

Viewing 1 replies (of 1 total)
  • You can try masking all output, or add filter to your custom field.

    You need to apply filter at the place where your custom filed is created, modified or written to output – it depends on nature of this custom field…

Viewing 1 replies (of 1 total)
  • The topic ‘Mask in Custom fields?’ is closed to new replies.