🐞 feat: Add contact information section to footer with address, email, and phone icons
This commit is contained in:
+30
-3
@@ -61,12 +61,39 @@ $footerNav = ! empty( $locations['footer_navigation'] )
|
||||
</div>
|
||||
|
||||
|
||||
<div class="contact">
|
||||
<?php
|
||||
$address = getFieldValue( 'contact_info.address' ) ? getFieldValue( 'contact_info.address' ) : '';
|
||||
$phone = getFieldValue( 'contact_info.phone' ) ? getFieldValue( 'contact_info.phone' ) : '';
|
||||
$email = getFieldValue( 'contact_info.email' ) ? getFieldValue( 'contact_info.email' ) : '';
|
||||
?>
|
||||
|
||||
<?php dynamic_sidebar( 'footer-1' ); ?>
|
||||
<?php if ( $address ) : ?>
|
||||
<div class="contact__item contact__address mt-6">
|
||||
<p><?php echo wp_kses_post( $address ); ?></p>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
if ( $email ) :
|
||||
?>
|
||||
<div class="contact__item contact__email mt-4">
|
||||
<p><a href="mailto:<?php echo esc_attr( $email ); ?>" class="text-cwc-blue-01 hover:underline"><?php echo esc_html( $email ); ?></a></p>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
if ( $phone ) :
|
||||
?>
|
||||
<div class="contact__item contact__phone mt-4">
|
||||
<p><a href="tel:<?php echo esc_attr( preg_replace( '/\D+/', '', $phone ) ); ?>" class="text-cwc-blue-01 hover:underline"><?php echo esc_html( $phone ); ?></a></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-right flex flex-col justify-end items-end">
|
||||
<?php dynamic_sidebar( 'footer-2' ); ?>
|
||||
<?php dynamic_sidebar( 'footer-1' ); ?>
|
||||
|
||||
<x-back-to-top></x-back-to-top>
|
||||
|
||||
@@ -77,7 +104,7 @@ $footerNav = ! empty( $locations['footer_navigation'] )
|
||||
null,
|
||||
array(
|
||||
'circle' => true,
|
||||
'classes' => 'social-icons p-0 text-18px',
|
||||
'classes' => 'social-icons p-0 text-14px bg-white! text-cwc-blue-02! hover:opacity-80!',
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user