Hello GEO Directory team!
When creating a new package, there’s an option to “Disable HTML Editor?”. The problem is, if the user knows how to write html, the formatted text is still displayed on their profile details. I don’t want users to be able to add links on that box (post_content).
I’ve tried using the following on functions.php, which does what I need, except the function is applied to ALL pages and CPTs.
function my_wp_content_function($content) {
return strip_tags($content,"<br><h1><h2><h3><h4><li><ul><ol>"); //add any tags here you want to preserve
}
add_filter('the_content', my_wp_content_function);
Is there an “IF” statement I can add to the above that will only target the listing GD Details (not archives nor any other “pages”)?
OR is there an easier way of stripping
<a>
tags from the description field?
Thanks in advance!