Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

The problem

After typing my post/page in the visual editor, when I switch to the HTML editor, the expected HTML elements do not show. Headings appear but paragraphs and divs do not.

A minority of people have suggested that only one editor can be used.

My question

  1. Can I not interchange between the visual and HTML tabs when writing a post/page?
  2. Why can't I view the HTML elements?
share|improve this question
    
General questions about using WordPress should be directed to the wordpress.org support forums. –  Chip Bennett Oct 20 '11 at 18:15
    
Thanks Chip. Noted. What is the website for? Must my questions focus exclusively on code? –  Dominor Novus Oct 20 '11 at 23:08
    
Generally speaking, WPSE scope includes WordPress development, rather than use. The link is to the official WPORG support forums, which are the best place to post questions regarding use of WordPress. –  Chip Bennett Oct 20 '11 at 23:44

1 Answer 1

up vote 0 down vote accepted

You can switch back and forth between the editors as much as you want. But the <p></p> tags usually don't show up in the HTML edit view unless there's special styling applied to the paragraph (i.e. font size, color, alignment).

Let's say you have the following in the HTML editor:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque quis neque sed ligula iaculis
blandit quis et tellus. Aenean et dolor et augue rutrum scelerisque id a orci. Duis odio 
lectus, commodo vitae eleifend a, iaculis id nisl. 

Nunc placerat purus quis nisi vehicula id tincidunt tortor congue. Cras porttitor tortor 
eu arcu faucibus hendrerit porttitor nunc aliquet. Nulla sodales venenatis nisl, id tempus 
est ultrices in. In cursus velit quis ante posuere pellentesque. Aenean feugiat mattis 
adipiscing. Suspendisse ut felis eget neque commodo pulvinar at lobortis ante. Aliquam erat 
volutpat.

There are no <p></p> tags, but WordPress will automatically add them when it passes your post content through the wp_autop filter.

If you want, you can manually add them in the HTML view, but you don't need to. The extra line break between the two paragraphs is sufficient to trigger a break in the actual markup.

share|improve this answer
    
Thanks for the response EAMann. I needed an indication that this was meant to be the case. I used this plugin to get the editor to reveal the excluded tags: wordpress.org/extend/plugins/tinymce-advanced –  Dominor Novus Oct 20 '11 at 23:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.