HTML Field cut my DIV tags

This topic contains 3 replies, has 2 voices, and was last updated by  Paolo 8 years ago.

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

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #287877

    Evgeny Kyselev
    Free User
    Post count: 8

    I add custom HTML field, that my customers can insert their HTML code to the listings.
    When i try to test it, all my code was cutted.

    For example on Screenshot_48 i paste my ECWID code (E-Commerce platform) to this field called Магазин (html field). But when i save it cut whole code (Screenshot_49).

    When i trying to do the same on Posts – it add my code.

    On Screenshot_50 u can see which result i receive after i paste my code and what it cut.

    So my question – where i can disable code formatting in GeoDirectory?

    #287932

    Evgeny Kyselev
    Free User
    Post count: 8

    Solved. Added to functions.php

    
    
     // stop wp removing div tags
    function tinymce_fix( $init )
    {
        // html elements being stripped
        $init['extended_valid_elements'] = 'div[*], script[*]';
    
        // pass back to wordpress
        return $init;
    }
    add_filter('tiny_mce_before_init', 'tiny_mce_fix');
    #287963

    Paolo
    Site Admin
    Post count: 31206

    hi,

    please provide a link and admin credentials in a private reply (only staff can read) and the code you are trying to insert and I will have a look.

    Let us know,

    Thanks

    #287970

    Paolo
    Site Admin
    Post count: 31206

    Ok thanks for letting us know 🙂

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

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

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount