Title: Bento generates invalid inline CSS on posts
Last modified: April 23, 2020

---

# Bento generates invalid inline CSS on posts

 *  [Sentynel](https://wordpress.org/support/users/sentynel/)
 * (@sentynel)
 * [6 years ago](https://wordpress.org/support/topic/bento-generates-invalid-inline-css-on-posts/)
 * I noticed today that our Bento theme is generating the following CSS in the bento-
   theme-styles-inline-css section on posts:
 *     ```
       			.post-header-title h1,
       			.entry-header h1 { 
       				color: ; 
       			}
       			.post-header-subtitle {
       				color: #999999;
       			}
       			.site-content {
       				background-color: ;
       			}
       ```
   
 * This is obviously invalid. It looks like it comes from `bento_insert_custom_styles()`
   on line 413 of functions.php:
 *     ```
               if ( is_singular() || ( is_home() && 'page' == get_option( 'show_on_front' ) ) ) {
                       $custom_css .= ' 
                               .post-header-title h1,
                               .entry-header h1 { 
                                       color: '.esc_html( get_post_meta( $postid, 'bento_title_color', true ) ).'; 
                               }
                               .post-header-subtitle {
                                       color: '.esc_html( get_post_meta( $postid, 'bento_subtitle_color', true ) ).'; 
                               }
                               .site-content {
                                       background-color: '.esc_html( get_post_meta( $postid, 'bento_page_background_color', true ) ).'; 
                               }
                       ';
       ```
   
 * Presumably this should be checking if the post_meta items it retrieves are empty
   and only including the relevant CSS if not?

The topic ‘Bento generates invalid inline CSS on posts’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/bento/2.5/screenshot.png)
 * Bento
 * [Support Threads](https://wordpress.org/support/theme/bento/)
 * [Active Topics](https://wordpress.org/support/theme/bento/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/bento/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/bento/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Sentynel](https://wordpress.org/support/users/sentynel/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/bento-generates-invalid-inline-css-on-posts/)
 * Status: not resolved