code color change for "Contact Section"

Hello, I see other posts to change the peachy background color in the contact section However, I don’t see it. Can you verify I’m in the right place?

front-page-contact-us-php

I don’t see background color anywhere in that template

Thank You,
Lou

Hello Lou,

To change the color of the contact section you need to deal with the CSS styling, which can be found in main.scss or main.min.css file.

You could use to overwrite the color rule directly by using this CSS snippet:

#contact-us {
    background-color: red;
}

Ideally, the above CSS code should be placed in a child’s theme style.css

But you can use a plugin like Simple Custom CSS or place it directly in Dashboard > Appearances > Editor > Style.css but keep in mind that this will get erased if you replace/update the theme files.

Let me know if you got everything alright.

Regards

1 Like

Hi there,

I’ve got the same issue and want to change that ‘peachy’ color but could you tell where exactly to insert that code because in the main css it is that big:

<?php
/**

  • The template for displaying the contact us section in front page.

  • @package WordPress

  • @subpackage illdy
    */
    ?>
    <?php
    if ( current_user_can( ‘edit_theme_options’ ) ) {

    $contact_bar_facebook_url = get_theme_mod( ‘illdy_contact_bar_facebook_url’, esc_url( ‘#’ ) );
    $contact_bar_twitter_url = get_theme_mod( ‘illdy_contact_bar_twitter_url’, esc_url( ‘#’ ) );
    $contact_bar_linkedin_url = get_theme_mod( ‘illdy_contact_bar_linkedin_url’, esc_url( ‘#’ ) );
    $contact_bar_googlep_url = get_theme_mod( ‘illdy_contact_bar_googlep_url’, esc_url( ‘#’ ) );
    $contact_bar_youtube_url = get_theme_mod( ‘illdy_contact_bar_youtube_url’, esc_url( ‘#’ ) );
    $contact_bar_vimeo_url = get_theme_mod( ‘illdy_contact_bar_vimeo_url’, esc_url( ‘#’ ) );
    $contact_bar_pinterest_url = get_theme_mod( ‘illdy_contact_bar_pinterest_url’, esc_url( ‘#’ ) );
    $contact_bar_instagram_url = get_theme_mod( ‘illdy_contact_bar_instagram_url’, esc_url( ‘#’ ) );
    $email = get_theme_mod( ‘illdy_email’, __( ‘[email protected]’, ‘illdy’ ) );
    $phone = get_theme_mod( ‘illdy_phone’, __( ‘(555) 555-5555’, ‘illdy’ ) );
    $address1 = get_theme_mod( ‘illdy_address1’, __( 'Street 221B Baker Street, ', ‘illdy’ ) );
    $address2 = get_theme_mod( ‘illdy_address2’, __( ‘London, UK’, ‘illdy’ ) );
    $general_title = get_theme_mod( ‘illdy_contact_us_general_title’, __( ‘Contact us’, ‘illdy’ ) );
    $general_entry = get_theme_mod( ‘illdy_contact_us_general_entry’, __( ‘And we will get in touch as soon as possible.’, ‘illdy’ ) );
    $general_contact_form_7 = get_theme_mod( ‘illdy_contact_us_general_contact_form_7’ );
    $general_address_title = get_theme_mod( ‘illdy_contact_us_general_address_title’, __( ‘Address’, ‘illdy’ ) );
    $customer_support_title = get_theme_mod( ‘illdy_contact_us_general_customer_support_title’, __( ‘Customer Support’, ‘illdy’ ) );
    } else {
    $contact_bar_facebook_url = get_theme_mod( ‘illdy_contact_bar_facebook_url’ );
    $contact_bar_twitter_url = get_theme_mod( ‘illdy_contact_bar_twitter_url’ );
    $contact_bar_linkedin_url = get_theme_mod( ‘illdy_contact_bar_linkedin_url’ );
    $contact_bar_googlep_url = get_theme_mod( ‘illdy_contact_bar_googlep_url’ );
    $contact_bar_youtube_url = get_theme_mod( ‘illdy_contact_bar_youtube_url’ );
    $contact_bar_vimeo_url = get_theme_mod( ‘illdy_contact_bar_vimeo_url’ );
    $contact_bar_pinterest_url = get_theme_mod( ‘illdy_contact_bar_pinterest_url’ );
    $contact_bar_instagram_url = get_theme_mod( ‘illdy_contact_bar_instagram_url’ );
    $email = get_theme_mod( ‘illdy_email’ );
    $phone = get_theme_mod( ‘illdy_phone’ );
    $address1 = get_theme_mod( ‘illdy_address1’ );
    $address2 = get_theme_mod( ‘illdy_address2’ );
    $general_title = get_theme_mod( ‘illdy_contact_us_general_title’ );
    $general_entry = get_theme_mod( ‘illdy_contact_us_general_entry’ );
    $general_contact_form_7 = get_theme_mod( ‘illdy_contact_us_general_contact_form_7’ );
    $general_address_title = get_theme_mod( ‘illdy_contact_us_general_address_title’ );
    $customer_support_title = get_theme_mod( ‘illdy_contact_us_general_customer_support_title’ );
    }

if ( $general_title != ‘’ || $general_entry != ‘’ || $general_address_title != ‘’ || $address1 != ‘’ || $address2 != ‘’ || $customer_support_title != ‘’ || $email != ‘’ || $phone != ‘’ || $contact_bar_twitter_url != ‘’
|| $contact_bar_facebook_url != ‘’ || $contact_bar_linkedin_url != ‘’ || $contact_bar_googlep_url != ‘’ || $contact_bar_instagram_url || $contact_bar_vimeo_url != ‘’ || $contact_bar_pinterest_url != ‘’ || $contact_bar_youtube_url != ‘’
|| $general_contact_form_7 != null && $general_contact_form_7 != ‘default’ ) {

?&gt;
&lt;section id="contact-us" class="front-page-section"&gt;
	&lt;?php if ( $general_title || $general_entry ): ?&gt;
		&lt;div class="section-header"&gt;
			&lt;div class="container"&gt;
				&lt;div class="row"&gt;
					&lt;?php if ( $general_title ): ?&gt;
						&lt;div class="col-sm-12"&gt;
							&lt;h3&gt;&lt;?php echo illdy_sanitize_html( $general_title ); ?&gt;&lt;/h3&gt;
						&lt;/div&gt;&lt;!--/.col-sm-12--&gt;
					&lt;?php endif; ?&gt;
					&lt;?php if ( $general_entry ): ?&gt;
						&lt;div class="col-sm-10 col-sm-offset-1"&gt;
							&lt;p&gt;&lt;?php echo illdy_sanitize_html( $general_entry ); ?&gt;&lt;/p&gt;
						&lt;/div&gt;&lt;!--/.col-sm-10.col-sm-offset-1--&gt;
					&lt;?php endif; ?&gt;
				&lt;/div&gt;&lt;!--/.row--&gt;
			&lt;/div&gt;&lt;!--/.container--&gt;
		&lt;/div&gt;&lt;!--/.section-header--&gt;
	&lt;?php endif; ?&gt;
	&lt;div class="section-content"&gt;
		&lt;div class="container"&gt;
			&lt;div class="row"&gt;
				&lt;div class="col-sm-12"&gt;
					&lt;div class="row" style="margin-bottom: 45px;"&gt;
						&lt;div class="col-sm-4"&gt;
							&lt;div class="contact-us-box"&gt;
								&lt;?php if ( $general_address_title ): ?&gt;
									&lt;div class="box-left" data-customizer="box-left-address-title"&gt;
										&lt;?php echo illdy_sanitize_html( $general_address_title ); ?&gt;
									&lt;/div&gt;&lt;!--/.box-left--&gt;
								&lt;?php endif; ?&gt;
								&lt;div class="box-right"&gt;
									&lt;?php if ( $address1 ): ?&gt;
										&lt;span class="box-right-row" data-customizer="contact-us-address-1"&gt;&lt;?php echo illdy_sanitize_html( $address1 ); ?&gt;&lt;/span&gt;
									&lt;?php endif; ?&gt;
									&lt;?php if ( $address2 ): ?&gt;
										&lt;span class="box-right-row" data-customizer="contact-us-address-2"&gt;&lt;?php echo illdy_sanitize_html( $address2 ); ?&gt;&lt;/span&gt;
									&lt;?php endif; ?&gt;
								&lt;/div&gt;&lt;!--/.box-right--&gt;
							&lt;/div&gt;&lt;!--/.contact-us-box--&gt;
						&lt;/div&gt;&lt;!--/.col-sm-4--&gt;
						&lt;div class="col-sm-5"&gt;
							&lt;div class="contact-us-box"&gt;
								&lt;?php if ( $customer_support_title ): ?&gt;
									&lt;div class="box-left" data-customizer="box-left-customer-support-title"&gt;
										&lt;?php echo illdy_sanitize_html( $customer_support_title ); ?&gt;
									&lt;/div&gt;&lt;!--/.box-left--&gt;
								&lt;?php endif; ?&gt;
								&lt;div class="box-right"&gt;
									&lt;?php if ( $email ): ?&gt;
										&lt;span class="box-right-row"&gt;&lt;?php _e( 'E-mail:', 'illdy' ); ?&gt;
											<a>" title="&lt;?php echo esc_attr( $email ); ?&gt;"&gt;&lt;?php echo esc_html( $email ); ?&gt;</a>&lt;/span&gt;
									&lt;?php endif; ?&gt;
									&lt;?php if ( $phone ): ?&gt;
										&lt;span class="box-right-row" data-customizer="contact-us-phone"&gt;&lt;?php _e( 'Phone:', 'illdy' ); ?&gt;&lt;?php echo illdy_sanitize_html( $phone ); ?&gt;&lt;/span&gt;
									&lt;?php endif; ?&gt;
								&lt;/div&gt;&lt;!--/.box-right--&gt;
							&lt;/div&gt;&lt;!--/.contact-us-box--&gt;
						&lt;/div&gt;&lt;!--/.col-sm-5--&gt;
						&lt;div class="col-sm-3"&gt;
							&lt;?php if ( $contact_bar_twitter_url || $contact_bar_facebook_url || $contact_bar_linkedin_url || $contact_bar_googlep_url || $contact_bar_pinterest_url || $contact_bar_instagram_url || $contact_bar_youtube_url || $contact_bar_vimeo_url ) { ?&gt;
								&lt;div class="contact-us-social"&gt;
									&lt;?php if ( $contact_bar_twitter_url ): ?&gt;
										<a>" title="&lt;?php _e( 'Twitter', 'illdy' ); ?&gt;" target="_blank"&gt;&lt;i class="fa fa-twitter"&gt;&lt;/i&gt;</a>
									&lt;?php endif; ?&gt;
									&lt;?php if ( $contact_bar_facebook_url ): ?&gt;
										<a>" title="&lt;?php _e( 'Facebook', 'illdy' ); ?&gt;" target="_blank"&gt;&lt;i class="fa fa-facebook"&gt;&lt;/i&gt;</a>
									&lt;?php endif; ?&gt;
									&lt;?php if ( $contact_bar_linkedin_url ): ?&gt;
										<a>" title="&lt;?php _e( 'LinkedIn', 'illdy' ); ?&gt;" target="_blank"&gt;&lt;i class="fa fa-linkedin"&gt;&lt;/i&gt;</a>
									&lt;?php endif; ?&gt;
									&lt;?php if ( $contact_bar_googlep_url ): ?&gt;
										<a>" title="&lt;?php _e( 'Google+', 'illdy' ); ?&gt;" target="_blank"&gt;&lt;i class="fa fa-google-plus"&gt;&lt;/i&gt;</a>
									&lt;?php endif; ?&gt;
									&lt;?php if ( $contact_bar_pinterest_url ): ?&gt;
										<a>" title="&lt;?php _e( 'Pinterest', 'illdy' ); ?&gt;" target="_blank"&gt;&lt;i class="fa fa-pinterest"&gt;&lt;/i&gt;</a>
									&lt;?php endif; ?&gt;
									&lt;?php if ( $contact_bar_instagram_url ): ?&gt;
										<a>" title="&lt;?php _e( 'Instagram', 'illdy' ); ?&gt;" target="_blank"&gt;&lt;i class="fa fa-instagram"&gt;&lt;/i&gt;</a>
									&lt;?php endif; ?&gt;
									&lt;?php if ( $contact_bar_youtube_url ): ?&gt;
										<a>" title="&lt;?php _e( 'YouTube', 'illdy' ); ?&gt;" target="_blank"&gt;&lt;i class="fa fa-youtube"&gt;&lt;/i&gt;</a>
									&lt;?php endif; ?&gt;
									&lt;?php if ( $contact_bar_vimeo_url ): ?&gt;
										<a>" title="&lt;?php _e( 'Vimeo', 'illdy' ); ?&gt;" target="_blank"&gt;&lt;i class="fa fa-vimeo"&gt;&lt;/i&gt;</a>
									&lt;?php endif; ?&gt;
								&lt;/div&gt;&lt;!--/.contact-us-social--&gt;
							&lt;?php } ?&gt;
						&lt;/div&gt;&lt;!--/.col-sm-3--&gt;
					&lt;/div&gt;&lt;!--/.row--&gt;
				&lt;/div&gt;&lt;!--/.col-sm-12--&gt;
			&lt;/div&gt;&lt;!--/.row--&gt;
			&lt;div class="row"&gt;
				&lt;div class="col-sm-12"&gt;
					&lt;?php if ( class_exists( 'WPCF7' ) &amp;&amp; $general_contact_form_7 != null &amp;&amp; $general_contact_form_7 != 'default' ): ?&gt;
						&lt;?php $shortcode = '[contact-form-7 id="' . esc_html( $general_contact_form_7 ) . '"]'; ?&gt;
						&lt;?php echo do_shortcode( $shortcode ); ?&gt;
					&lt;?php endif; ?&gt;
				&lt;/div&gt;&lt;!--/.col-sm-12--&gt;
			&lt;/div&gt;&lt;!--/.row--&gt;
		&lt;/div&gt;&lt;!--/.container--&gt;
	&lt;/div&gt;&lt;!--/.section-content--&gt;
&lt;/section&gt;&lt;!--/#contact-us {
background-color: red;

}#contact-us.front-page-section–>

<?php } ?>

MANY THANKS…

Sophie

Hi @sophie,

Please post a new thread with your issue and refferring to this post.

We want to keep the forum very easy to folllow.

Than you for understanding.

Thanks,

Cristian

This helps, thanks a lot.

Nice to hear this code snippet did the work

Regards