feed Posts (RSS | eMail)
feed Comments (RSS | eMail)
Loading...

Please consider signing the Google Gmail Automatic BCC Option Petition
and spread the word. Thanks!

I need more signatures - at least, help me reach the 100 for starters! :-)
[click box to close]

Whenever I was using a <div>-tag in a post within the richt text editor of WordPress (i.e. for showing php code as in this post), it was replaced by a <p>-tag which was not what I wanted.

Then I stumbled across this fix on the WordPress support forum to correct this odd behaviour - and it works fine so far!

CAVE:
The fix described in that post requires to manually change the core WordPress files, so you’d better know what you are doing!

[Update from 2008-03-29]
Here is another fix that I found recently as I upgraded my WP installation to the newest version (haven’t tested this fix yet):

1. Open the file called tiny_mce.js located in the wp-includes\js\tinymce folder
2. Goto line 130 - look for this: this._def(”extended_valid_elements”, “”);
3. Change it to this: this._def(”extended_valid_elements”, “div[id|class]“);

Thanks to Scott Bernardot who described this in a comment on urbangiraffe.com and to “richarduk” who linked there in a post on the wordpress.org-forum.

[Update from 2008-06-05]
I found out that some strange spam sites were linking to this post, and there was a lot of uncommon traffic hitting this post - so I decided to change the URL… sorry if you did not find this post at once.

The post ends here. Wanna leave a response? Have Your Say!
BTW: This post has comments.

Next post: My Own Customized WP Theme Progress - Part II
Previous post: Display Recent Posts And Comments

Trackback URI | Comments RSS | Permalink

del.icio.us del.icio.us eMail this post eMail Print Print
Did you like this post? NoYes
No votes yet, be the first!
Loading ... Loading ...

Comments

  1. This is
     Comment 
    #1
     Antony Faast
    2007-12-31 @ 04:29:55 +0100 (CET) | Reply | Quote | Permalink

    Mate thanks for this fix. Oh and i like your spam protection where you have to add the numbers! That’s cool I just hope I get it right.


Have Your Say!

back to top