Title: HTML code erasing when Gallery updated
Last modified: August 30, 2016

---

# HTML code erasing when Gallery updated

 *  Resolved [ecdierks16](https://wordpress.org/support/users/ecdierks16/)
 * (@ecdierks16)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/html-code-erasing-when-gallery-updated/)
 * When trying to use this code to hide the title on each page, if I update the 
   gallery on the page it erases this code:
 * <style>.page-title{display: none !important;}</style>
 * Any way to put this in the Custom CSS with the condition of either the page ids
   or the name of the parent page to make all children page hide their title?
 * [https://wordpress.org/plugins/simple-custom-css/](https://wordpress.org/plugins/simple-custom-css/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [John Regan](https://wordpress.org/support/users/johnregan3/)
 * (@johnregan3)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/html-code-erasing-when-gallery-updated/#post-6838038)
 * Hi ecdierks16,
 * It would be a bit complicated to accomplish this with just CSS — specifically
   removing the title on child pages. Depending on your theme, you may have a class
   in the `<body>` element that you can grab on to.
 * For instance, on the Twenty Fifteen theme, there is a class of `postid-4` on 
   the posts and pages. So, in this theme, you could add the following in the Simple
   Custom CSS input:
 * \`
    .postid-4 .page-title, .postid-17 .page-title { display: none; } \` …and 
   that would do the trick.
 * Once again, this all depends on if/how your theme puts the post id into the `
   <body>`.

Viewing 1 replies (of 1 total)

The topic ‘HTML code erasing when Gallery updated’ is closed to new replies.

 * ![](https://ps.w.org/simple-custom-css/assets/icon-256x256.jpg?rev=1819543)
 * [Simple Custom CSS Plugin](https://wordpress.org/plugins/simple-custom-css/)
 * [Support Threads](https://wordpress.org/support/plugin/simple-custom-css/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-custom-css/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-custom-css/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-custom-css/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [John Regan](https://wordpress.org/support/users/johnregan3/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/html-code-erasing-when-gallery-updated/#post-6838038)
 * Status: resolved