Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Hi,
Does anyone know how to restrict the content of a text area field? I would like to restrict access to videos (iframes pasted inside a text area) to those who are verified users and display a restrict access message.
Is it possible to use this shortcode some how?:
[userpro_private restrict_to_verified=1]...[/userpro_private]
I understand shortcode doesn’t work inside text area fields but I’m trying to embed this inside php as wordpress demonstrates:
However, I’m still having no luck. Perhaps this php then needs to be wrapped with <html> tags? (which doesn’t work either!)
Any help would be much appreciated!
I’ve just found the answer to my problem!
For anyone else who needs to put shortcodes inside text area fields just add the following at the end of your functions.php file:
1 2 |
add_filter( 'widget_text', 'shortcode_unautop'); add_filter( 'widget_text', 'do_shortcode'); |
p.s. not sure why the above code came out with #039 in it, but you need to replace this with: ‘
You must be logged in to reply to this topic.