<?php
/**
 * Template Part: Call to Action
 */
?>
<section class="cta-block" aria-labelledby="cta-heading">
    <h2 id="cta-heading" class="screen-reader-text">Contact call to action</h2>

    <div class="cta-block__inner">

        <?php if (is_404()): ?>

            <a class="cta-block__button" href="<?php echo esc_url(home_url('/')); ?>">
                Back to Home
            </a>

        <?php else: ?>

            <a class="cta-block__button" href="<?php echo esc_url(get_permalink(get_page_by_path('contact'))); ?>">
                Contact
            </a>

        <?php endif; ?>

    </div>
</section>