Files
LiveCartaWP/htdocs/wp-content/themes/lawcarta/page_home.php
2023-10-23 12:56:45 +02:00

84 lines
4.7 KiB
PHP

<?php
/**
* Template Name: Home Page
*/
$posts = get_posts(['posts_per_page' => 3]);
get_header();
?>
<div class="content">
<?php the_content();?><!--home page content from wp admin wysiwyg -->
<?php if($posts):?>
<div class="mp-blog">
<div class="cont">
<div class="inner-cont">
<h4 class="text-header">Our Blog</h4>
<div class="bp-list cat-all">
<?php foreach ($posts as $post): ?>
<a class="bp-block <?php $categories = get_the_category(); foreach($categories as $category):?><?= $category->slug; ?> <?php endforeach;?>" href="<?=get_permalink(); ?>">
<span class="bp-img">
<img src="<?=get_the_post_thumbnail_url(); ?>" alt="Blog img">
</span>
<span class="bp-title"><?=get_the_title($post); ?></span>
<span class="bp-description"><?=get_the_excerpt(); ?></span>
</a>
<?php endforeach; ?>
</div>
<div class="bp-btns">
<a href="/blog" class="button secondary">Browse all blog articles</a>
</div>
</div>
</div>
</div>
<?php endif; ?>
<div class="mp-feature bot-form with-bg main">
<div class="cont">
<div class="inner-cont">
<div class="flex">
<div class="col">
<div class="mp-interested">
<h4 class="text-header">Interested? Get to know more</h4>
<div class="buttons">
<a href="/contact-us" class="button action big">Book a demo</a>
<a href="<?= get_lawcarta_url()?>/user/registration" class="button secondary big">Sign up for free</a>
</div>
</div>
</div>
<div class="col">
<div class="subscribe-block">
<div class="sb-text">Subscribe and receive exclusive tips and offers!</div>
<div class="sub-input" style="position: relative">
<div id="mc_embed_signup">
<form
action="https://livecarta.us12.list-manage.com/subscribe/post?u=f1055fdbaf5889ec432f2821f&amp;id=a0685621c3&amp;f_id=003899e0f0"
method="post"
id="mc-embedded-subscribe-form"
name="mc-embedded-subscribe-form"
class="validate"
target="_blank"
novalidate>
<div id="mc_embed_signup_scroll" class="form-inline">
<input type="email" value="" name="EMAIL" class="required email form-control" id="mce-EMAIL" placeholder="Enter your Email" required>
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_f1055fdbaf5889ec432f2821f_a0685621c3" tabindex="-1" value=""></div>
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button secondary big">
</div>
<!-- <div id="mce-responses" class="clear" style="position: absolute; left: 0; top: 100%; font-size: 1.2rem; margin-top: 1rem; color: red;">
<div class="response" id="mce-error-response" style="display:none"></div>
<div class="response" id="mce-success-response" style="display:none"></div>
</div> -->
</form>
</div>
</div>
<!-- <script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script>
<script type='text/javascript'>(function ($) { window.fnames = new Array(); window.ftypes = new Array(); fnames[0] = 'EMAIL'; ftypes[0] = 'email'; fnames[1] = 'FNAME'; ftypes[1] = 'text'; fnames[2] = 'LNAME'; ftypes[2] = 'text'; }(jQuery)); var $mcj = jQuery.noConflict(true);</script> -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
get_footer();