Need help? Check out our Support site, then


WordPress does not accept div tag

  1. WordPress do not accept DIV Tag on my blog :|

  2. bummer!

  3. Paste the code here in the forum between backticks (the key to the left of the #1 with the ~ on it). WordPress will indeed strip some div code that is not allowed, but we cannot tell if we cannot see it.

  4. The code no have errors! A few minutes the code are accept, now no accept :(

  5. The sidebar not accpet the div, but the pages accept :|

  6. WordPress is obviously rolling out some new code for new features and bug fixes and when that happens, there can be glitches. My only suggestion is to give it some time for things to settle down.

  7. But in WordPress FAQ have a information of accept tags and list div tag!

  8. We are currently looking into some issues with recent code changes. I will post back when a fix is in place.

  9. The WordPress fixed this bug, thanks!

  10. Did they fixed raul008? when?

    < div > was change into <p > .. others are gone.. :(

  11. Hi raul008..
    try this..

    ------------------

    2.1 version tinyMCE will replace <div> by <p> when saving post, you may change this by hacking file: wp-includes/js/tinymce/tiny_mce_config.php
    about 24th line, find:
    $valid_elements = 'p/-div[*],-strong/-b[*],-em/-i[*],-font[*],-ul[*],-ol[*],-li[*],*[*]‘;

    replace by:
    $valid_elements = '-strong/-b[*],-em/-i[*],-font[*],-ul[*],-ol[*],-li[*],*[*]‘;

    ------------------

    ‘p/-div[*] to ‘p[*],-div[*]

    ‘-’ means remove empty elements
    ‘p/div’ means replace div by p
    ‘[*]‘ means any attribute allowed

    source: http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags

  12. rybaxs
    At wordpress.com we have no access to php
    The blog linkded to your name is at Blogger.

    http://en.forums.wordpress.com/topic/please-read-me-first-before-posting?replies=1

  13. Div will work at the first save of your code.. but if you open it again the <div> tag will be gone. but try to save it at once, it works..

  14. As 1tess says this is the WordPress.com forum, so you advice won't work, rybaxs, thank you though. strings are stripped out here.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.