WordPress does not accept div tag
-
-
-
-
-
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.
-
-
We are currently looking into some issues with recent code changes. I will post back when a fix is in place.
-
-
-
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 allowedsource: http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags
-
rybaxs
At wordpress.com we have no access to php
The blog linkded to your name is at Blogger.https://en.forums.wordpress.com/topic/please-read-me-first-before-posting?replies=1
-
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..
-
As 1tess says this is the WordPress.com forum, so you advice won’t work, rybaxs, thank you though. strings are stripped out here.
- The topic ‘WordPress does not accept div tag’ is closed to new replies.