WP No External Links
[resolved] Mask in Custom fields? (2 posts)

  1. devrekli
    Posted 2 years ago #

    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.


  2. Jehy
    Plugin Author

    Posted 2 years ago #

    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...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP No External Links
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.