How to show contact section on each page in Hestia Pro

If you are using Hestia Pro theme, it can be done easily without editing the code. Hestia Pro theme provides shortcodes of frontpage sections and we will use the shortcode of contact section  [hestia_contact] to duplicate it on other pages. 

Follow the steps:

  1. Go to WP-admin > Appearance > Hestia Pro Hooks.
  2. Inside "Before Footer" hook editor add the following code:
  3. <?php if ( ! is_front_page() ) : ?>
    <?php endif;?>

    Don't forget to enable the Execute PHP option below the hook area.

  4. After that click on the "Save Hooks" button. 
  5. Add the below CSS to Appearance -> Customize -> Additional CSS section to adjust the background image appearance.
  6. body:not(.home) section#contact{
    	background-position: center center;
        	background-size: cover;
    body:not(.home) section#contact:before{
    	content: '';
    	position: absolute;
    	z-index: 0;
      	top: 0;
       	right: 0;
       	bottom: 0;
       	left: 0;
      	background-color: rgba(0,0,0,0.7);

That's it, now the contact section will appear on each page of your website. 

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us