Amy-Mir / footer.php
footer.php
Raw
<?php
/**
 * The template for displaying the footer
 */

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

$menuItems = get_field('menu_items','options');
$menuCover = get_field('mobile_menu_cover','options');
$socialMedia = get_field('social_media_links','options');

$menuListFull = array_merge($menuItems['first_menu_list'],$menuItems['second_menu_list']);

?>

<footer class="footer__wrapper">
    <div class="container">

        <div class="footer__head">
            <hr>
            <img src="<?php echo get_template_directory_uri();?>/assets/EkspedisjonsJenta.svg"
                alt="Ekspedisjons Jenta" />
            <hr>
        </div>

        <div class="footer__headMob">
            <img src="<?php echo get_template_directory_uri();?>/assets/EkspedisjonsJenta.svg"
                alt="Ekspedisjons Jenta" />
            <div class="footer__headMobSocials">
                <hr>
                <ul>
                    <li>
                        <a href="<?php echo esc_attr( $socialMedia['facebook'])?>" target='_blank'
                            rel="noopener noreferrer">
                            <span class="fab fa-facebook-square"></span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo esc_attr( $socialMedia['instagram'])?>" target='_blank'
                            rel="noopener noreferrer">
                            <span class="fab fa-instagram"></span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo esc_attr( $socialMedia['linkedin'])?>" target='_blank'
                            rel="noopener noreferrer">
                            <span class="fab fa-linkedin"></span>
                        </a>
                    </li>
                </ul>
            </div>
        </div>

        <nav class="footer__body" role="navigation">
            <ul>
                <?php 
                foreach ($menuItems['first_menu_list'] as $item):
				$title = $item['menu_item_title'];
				$url = $item['menu_item_link'];
				?>
                <li>
                    <a class="menuItem" href="<?php echo esc_attr( $url); ?>">
                        <?php echo esc_html( $title ); ?>
                    </a>
                </li>
                <?php 
                endforeach; 
                ?>
            </ul>
            <ul>
                <li>
                    <a class="menuItem" href="<?php echo esc_attr( $socialMedia['facebook'])?>" target='_blank'
                        rel="noopener noreferrer">
                        <span class="fab fa-facebook-square"></span>
                    </a>
                </li>
                <li>
                    <a href="<?php echo esc_attr( $socialMedia['instagram'])?>" target='_blank'
                        rel="noopener noreferrer">
                        <span class="fab fa-instagram"></span>
                    </a>
                </li>
                <li>
                    <a href="<?php echo esc_attr( $socialMedia['linkedin'])?>" target='_blank'
                        rel="noopener noreferrer">
                        <span class="fab fa-linkedin"></span>
                    </a>
                </li>
            </ul>
            <ul>
                <?php 
                foreach ($menuItems['second_menu_list'] as $item):
				$title = $item['menu_item_title'];
				$url = $item['menu_item_link'];
				?>
                <li>
                    <a class="menuItem" href="<?php echo esc_attr( $url); ?>">
                        <?php echo esc_html( $title ); ?>
                    </a>
                </li>
                <?php 
                endforeach; 
                ?>
            </ul>
        </nav>

        <nav class="footer__bodyMob" role="navigation">
            <ul>
                <?php 
                foreach ($menuListFull as $item):
                $title = $item['menu_item_title'];
                $url = $item['menu_item_link'];
                ?>

                <li class="menuItem">
                    <a href="<?php echo esc_attr( $url); ?>">
                        <?php echo esc_html( $title ); ?>
                    </a>
                </li>

                <?php 
                endforeach; 
                ?>
            </ul>
        </nav>
        <hr>
        <div class="footer__tail">
            <p class="menuItem">Designet og utviklet av <a href="https://jrdesign.no" target="_blank"
                    rel="noopener noreferrer">JRDesign As</a></p>
            <p class="menuItem">Copyright ekspedisjonsjenta <span id="dateY"></span></p>
        </div>
    </div>
</footer>

<?php wp_footer(); ?>

</body>

</html>