Does anyone know how to prevent the following happening:
I find myself, more and more, using the HTML editor for posts and such in our WordPress site and when I insert something customised and then go to the Visual tab it strips out the HTML that i just added.
For example I use the following to appear below a gallery of thumbnails and just above a subheading:
<photoClick>CLICK IMAGES FOR LARGER VIEW</photoClick>
This is tied to a css rule that makes the text size smaller than the rest of the text on the page and grey so that it does not interrupt the visitor’s reading of the page too much. Any time I go to the Visual tab, WordPress removes the <photoClick> tags and you have to redo them again before updating/publishing the page or post.
Perhaps I am implementing the css rule in an incorrect manner.
Ideally I would like to implement the instruction CLICK IMAGES FOR LARGER VIEW to the visitor by hardcoding it in the site to appear whenever a gallery is used. I have tried to find where and how this can be done but so far it looks a bit too complex. Inspect Element in my browser suggests that galleries are contained in a div named gallery-1 (TwentyTen theme) but I can’t find anything that equates to this in the WordPress files.
- The topic ‘Keep HTML intact’ is closed to new replies.