Skip to content

Instantly share code, notes, and snippets.

@ciaranha
Created September 12, 2018 15:03
Show Gist options
  • Save ciaranha/2e75ad62eb2d64492db69ce7737c1b28 to your computer and use it in GitHub Desktop.
Save ciaranha/2e75ad62eb2d64492db69ce7737c1b28 to your computer and use it in GitHub Desktop.
<?php
/*
Template Name: Resource Investor Update Templates
*/
?>
<?php get_header(); ?>
<section class="hero-section hero-section-dark">
<div class="container grid">
<div class="col-6_sm-12">
<h1 class="hero-section-title">
<?php the_field('page_title'); ?>
</h1>
<p class="hero-section-subtitle">
<?php the_field('page_subtitle'); ?>
</p>
<?php if ( get_field( 'resource_single_hero_button' ) ): ?>
<a
href="<?php the_field('resource_single_btn_link'); ?>"
class="btn btn-white"
>
<?php the_field('resource_single_hero_button'); ?>
</a>
<?php endif; ?>
</div>
<div class="col-6_sm-12 col_sm-first_md-last">
<?php if ( get_field( 'resource_single_hero_image' ) ): ?>
<?php
$image = wp_get_attachment_image_src(get_field('resource_single_hero_image'), 'featured_image_size');
?>
<img
class="hero-section-uploaded-image"
src="<?php echo $image[0]; ?>"
alt="<?php echo get_the_title(get_field('resource_single_hero_image')) ?>" /
>
<?php else: ?>
<div class="hero-section-image-wrapper">
<?php the_field('dark_hero_update_image', 'option'); ?>
</div>
<?php endif; ?>
</div>
</div>
</section>
<section class="bg-gray with-padding">
<div class="container">
<h3>Our Most Popular Investor Update Templates</h3>
<div class="resources-investor-updates-cards">
<?php if( have_rows('update_template_card') ): ?>
<?php while( have_rows('update_template_card') ): the_row();
$sheet_name = get_sub_field('sheet_name');
$created_by = get_sub_field('created_by');
$sheet_link = get_sub_field('sheet_link');
$sheet_description = get_sub_field('sheet_description');
?>
<div class="resources-investor-updates-card">
<a href="<?php echo $sheet_link; ?>" target="_blank" class="resources-card-link">
<i class="fa fa-external-link"></i>
<div class="resources-card-content">
<div class="resources-card-logo">
<img src="/wp-content/themes/visible/dist/images/icons/update-xs.svg">
</div>
<div class="resources-card-text">
<h4 class="resources-card-header">
<?php echo $sheet_name; ?>
</h4>
<?php if( $created_by ): ?>
<span class="text-gray">
<?php echo $created_by; ?>
</span>
<?php endif; ?>
</div>
</div>
<?php if( $sheet_description ): ?>
<p class="resources-card-description">
<?php echo $sheet_description; ?>
</p>
<?php endif; ?>
</a>
<div class="resources-card-footer">
Investor Update Template
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
</section>
<section class="with-padding">
<div class="container">
<h3>The Investor Update Essentials</h3>
<div class="grid mt-40">
<?php if( have_rows('update_essential_card') ): ?>
<?php while( have_rows('update_essential_card') ): the_row();
$essential_title = get_sub_field('essential_title');
$essential_description = get_sub_field('essential_description');
$essential_link = get_sub_field('essential_link');
$essential_link_text = get_sub_field('essential_link_text');
?>
<div class="col-4_sm-12">
<div class="resources-investor-updates-post">
<p>
<strong><?php echo $essential_title; ?></strong>
</p>
<p class="text-gray">
<?php echo $essential_description; ?>
</p>
<p>
<a href="<?php echo $essential_link; ?>">
<?php echo $essential_link_text; ?>
</a>
</p>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
</section>
<div class="bg-gray">
<div class="grid">
<div class="col-6_xs-12 box single-testimonial" data-push-left="off-3_xs-0">
<div class="customer-testimonial-image">
<?php
$image = get_field('testimonial_image');
?>
<img
src="<?php echo $image['url']; ?>"
alt="<?php echo $image['alt']; ?>"
/>
</div>
<p>
<?php the_field('testimonial_quote'); ?>
</p>
<p class="customer-testimonial-name">
<?php the_field('testimonial_name'); ?>
</p>
</div>
</div>
</div>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment