Title: Retain Microdata Code Toggling Between Views
Last modified: August 21, 2016

---

# Retain Microdata Code Toggling Between Views

 *  Resolved [nickienicole](https://wordpress.org/support/users/nickienicole/)
 * (@nickienicole)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/retain-microdata-code-toggling-between-views/)
 * I need to add Schema.org microdata to multiple locations pages for a client’s
   site.
 * In HTML view I can enter:
    <div itemprop=”name”>Name</div>
 * However, when I toggle to Visual view, and update, it strips out all microdata
   code to just <div> or <span>.
 * I know there are multiple plugins available for adding microdata, but none of
   them do exactly what I want, plus it’s a lot more time-efficient if I just do
   it myself. **So those are not solutions for me**.
 * Also, manually editing the TinyMCE files won’t work, because I do not have access
   to them, and I believe _they will get overwritten when there’s an update anyway_.
   I saw this post here, that would probably do the trick: [https://snipt.net/jamesw/prevent-tinymce-from-stripping-schemaorg-attributes-in-wordpress/](https://snipt.net/jamesw/prevent-tinymce-from-stripping-schemaorg-attributes-in-wordpress/)
   
   However, I do not know where to place that code, if I can, since I do not have
   backend access to those files.
 * We do have TinyMCE Advanced plugin installed, but I’m not sure if this is a solution.
   I’ve spent hours searching on the web to try to fix this, including extensive
   research on this forum, and I’ve come up with nothing.
 * Please help!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/retain-microdata-code-toggling-between-views/#post-3651042)
 * Switching between Visual and Text editors is best avoided – it WILL strip out
   code. It’s a known issue. Try just using TEXT and updating before switching to
   the other.
 *  Thread Starter [nickienicole](https://wordpress.org/support/users/nickienicole/)
 * (@nickienicole)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/retain-microdata-code-toggling-between-views/#post-3651048)
 * Thank you, WPyogi, but I’ve actually tried that, too. I did “update” while in
   TEXT, but when I switched over (and updated), it stripped it all out. If it was
   just me working on the site, it would be no big deal; I could just leave it all
   in text, but the client will be making changes, and once they do, all the work
   will disappear!
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/retain-microdata-code-toggling-between-views/#post-3651049)
 * I really don’t know but you might ask on the Advanced TinyMCE plugin forum here:
 * [http://wordpress.org/support/plugin/tinymce-advanced](http://wordpress.org/support/plugin/tinymce-advanced)
 *  Thread Starter [nickienicole](https://wordpress.org/support/users/nickienicole/)
 * (@nickienicole)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/retain-microdata-code-toggling-between-views/#post-3651051)
 * [@wpyogi](https://wordpress.org/support/users/wpyogi/): Thank you for your last
   suggestion; I hadn’t thought of that yet 🙂
 *  Thread Starter [nickienicole](https://wordpress.org/support/users/nickienicole/)
 * (@nickienicole)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/retain-microdata-code-toggling-between-views/#post-3651078)
 * I solved this by creating a Custom Field where I could paste the code exactly
   as I wanted.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Retain Microdata Code Toggling Between Views’ is closed to new replies.

## Tags

 * [microdata](https://wordpress.org/support/topic-tag/microdata/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [nickienicole](https://wordpress.org/support/users/nickienicole/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/retain-microdata-code-toggling-between-views/#post-3651078)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
