Disable HTML Editor — Strip tags

This topic contains 6 replies, has 3 voices, and was last updated by  Kiran 4 years, 6 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #503795

    seoadvantage
    Lifetime Member
    Post count: 17

    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!

    #503805

    Alex Rollin
    Moderator
    Post count: 27815

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #509743

    Kiran
    Moderator
    Post count: 7069

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #509766

    seoadvantage
    Lifetime Member
    Post count: 17
    This reply has been marked as private.
    #509969

    Kiran
    Moderator
    Post count: 7069

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #510185

    seoadvantage
    Lifetime Member
    Post count: 17
    This reply has been marked as private.
    #510550

    Kiran
    Moderator
    Post count: 7069

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket