Schonhose

Home | PP Addons| Gallery | Photoblog

WordPress visual editor & HTML in posts

September 19, 2007

As mentioned in my previous post I completely redesigned the downloads section on this site. I saw some nice examples on another blog and created a modified HTML version to achieve a similar effect. Once I was happy with both the HTML and the CSS I transfered the CSS to the stylesheet and the HTML into a post.

When I previewed the page I was shocked. The layout was totally different than what I had in mind. So I decided to check the source. It was than that I discovered something in WordPress has changed the original code to something totally different. This was why the layout was totally off.

I first suspected the wpautop function, which auto formats your posts in WordPress. After disabling this functionality the HTML got through as intended. However, it also left me with a lot of changes to earlier posts. I relied on the autoformat to get the job done. =D

Since disabling the function was not an option, I decided to dig a little deeper. It turns out that TinyMCE, the visual editor in WordPress, is programmed to replace tags it does not recognize. Sure enough, after disabling the Visual Editor in the Users panel and enabling the wpautop function, my blog returned to a normal state.

Older posts are displayed as usual, newer posts with HTML and CSS display also as intended. Three hours gone, problem solved.

Categories
Website
Tags
PHP, Website

« Squashing bugs, one at the time Haringen in een ton »

Navigation

  • Miscellaneous
  • Photography
  • Programming
  • Website

Countdown:

    No dates present

Tagcloud

3g addon allergic rhinitis backup basketball battery replacement Bob Marley budweiser bug Defensio design ebay exposition googlemaps HDR King layout update Lightroom Miscellaneous music paypal personal photoblog Photography Photoshop PHP Pixelpost pollens preview quote rant Touch UNC update videoclip vote Website Wordpress youtube

Flickr: latest uploads

Broeltorens, KortrijkNarcissus50 point dart140!StadskanaalEuroStaete building by nightThe end of summerFishermen memorial at KatwijkBranch in the sandFir cones
 

Paypal Donations

Why donate? Any donation will be considered a motivation to continue providing support and writing more plugins.

Please remember: it is not the amount but the thought that counts!
Amount: $

Twitter:

No public Twitter messages.

rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox