[Resolved] Mask in Custom fields?
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.
- The topic ‘[Resolved] Mask in Custom fields?’ is closed to new replies.