Skip to content

Instantly share code, notes, and snippets.

@SauntValerian
Last active August 11, 2017 19:17
Show Gist options
  • Save SauntValerian/dacef3e81f8f86347459ddf208746943 to your computer and use it in GitHub Desktop.
Save SauntValerian/dacef3e81f8f86347459ddf208746943 to your computer and use it in GitHub Desktop.
HTML sections per tier
// Below are the sections of HTML that I need to work into the template file for the loop I am trying to figure out.
// PLATINUM
<div class="location_indv_post platinum">
<div class="location-main-img-title">
<h3>
<a href="<?php the_permalink(); ?>"><?php the_title(); the_favorites_button(); ?></a>
</h3>
<a href="<?php the_permalink(); ?>">
<?php
$image1 = get_field('location_featured_image');
$image2 = get_field('location_featured_image_2');
$image3 = get_field('location_featured_image_3');
$size1 = 'large'; // (thumbnail, medium, large, full or custom size)
$size2 = 'medium';
$size3 = 'medium';
if( $image1 ) {
echo wp_get_attachment_image( $image1, $size1 );
} ?>
</a>
</div>
<div class="location-extra-imgs">
<a href="<?php the_permalink(); ?>">
<?php
if( $image2 ) {
echo wp_get_attachment_image( $image2, $size2 );
}
if( $image3 ) {
echo wp_get_attachment_image( $image3, $size3 );
}
?>
</a>
</div>
<?php if( get_field('location_view_type') ): ?>
<div class="location_view_type">
<h4>View Type: </h4>
<?php
$values = get_field('location_view_type');
if($values)
{
echo '<ul>';
foreach($values as $value)
{
echo '<li>' . $value . '</li>';
}
echo '</ul>';
}
?>
</div>
<?php endif; ?>
<?php if( get_field('location_category') ): ?>
<div class="location_category">
<h4>Celebrate: </h4>
<?php the_field("location_category"); ?>
</div>
<?php endif; ?>
<?php if( get_field('location_ceremony_capacity_number') ): ?>
<div class="location_ceremony_capacity_number">
<h4>Guest Capacity : </h4>
<?php the_field("location_ceremony_capacity_number"); ?>
</div>
<?php endif; ?>
</div>
// END PLATINUM
// GOLD
<div class="location_indv_post gold">
<div class="location-main-img-title">
<h3>
<a href="<?php the_permalink(); ?>"><?php the_title(); the_favorites_button(); ?></a>
</h3>
<a href="<?php the_permalink(); ?>">
<?php
$image1 = get_field('location_featured_image');
$size1 = 'full'; // (thumbnail, medium, large, full or custom size)
if( $image1 ) {
echo wp_get_attachment_image( $image1, $size1 );
}
?>
</a>
</div>
<?php if( get_field('location_view_type') ): ?>
<div class="location_view_type">
<h4>View Type: </h4>
<?php
$values = get_field('location_view_type');
if($values)
{
echo '<ul>';
foreach($values as $value)
{
echo '<li>' . $value . '</li>';
}
echo '</ul>';
}
?>
</div>
<?php endif; ?>
<?php if( get_field('location_ceremony_capacity_number') ): ?>
<div class="location_ceremony_capacity_number">
<h4>Guest Capacity: </h4>
<?php the_field("location_ceremony_capacity_number"); ?>
</div>
<?php endif; ?>
</div>
// END GOLD
// SILVER
<div class="location_indv_post silver">
<a href="<?php the_permalink(); ?>">
<div class="location-main-content-title">
<h3 style="color: #ffffff;">
<?php the_title(); the_favorites_button(); ?>
</h3>
<?php if( get_field('location_ceremony_capacity_number') ): ?>
<div class="location_ceremony_capacity_number">
<h4>Guest Capacity: </h4>
<?php the_field("location_ceremony_capacity_number"); ?>
</div>
<?php endif; ?>
</div>
</a>
<?php
$image1 = get_field('location_featured_image');
$size1 = 'full'; // (thumbnail, medium, large, full or custom size)
if( $image1 ) {
echo wp_get_attachment_image( $image1, $size1 );
}
?>
</div>
// END SILVER
// Below are the sections of HTML that I need to work into the template file for the loop I am trying to figure out.
// PLATINUM
<div class="location_indv_post platinum">
<div class="location-main-img-title">
<h3>
<a href="<?php the_permalink(); ?>"><?php the_title(); the_favorites_button(); ?></a>
</h3>
<a href="<?php the_permalink(); ?>">
<?php
$image1 = get_field('location_featured_image');
$image2 = get_field('location_featured_image_2');
$image3 = get_field('location_featured_image_3');
$size1 = 'large'; // (thumbnail, medium, large, full or custom size)
$size2 = 'medium';
$size3 = 'medium';
if( $image1 ) {
echo wp_get_attachment_image( $image1, $size1 );
} ?>
</a>
</div>
<div class="location-extra-imgs">
<a href="<?php the_permalink(); ?>">
<?php
if( $image2 ) {
echo wp_get_attachment_image( $image2, $size2 );
}
if( $image3 ) {
echo wp_get_attachment_image( $image3, $size3 );
}
?>
</a>
</div>
<?php if( get_field('location_view_type') ): ?>
<div class="location_view_type">
<h4>View Type: </h4>
<?php
$values = get_field('location_view_type');
if($values)
{
echo '<ul>';
foreach($values as $value)
{
echo '<li>' . $value . '</li>';
}
echo '</ul>';
}
?>
</div>
<?php endif; ?>
<?php if( get_field('location_category') ): ?>
<div class="location_category">
<h4>Celebrate: </h4>
<?php the_field("location_category"); ?>
</div>
<?php endif; ?>
<?php if( get_field('location_ceremony_capacity_number') ): ?>
<div class="location_ceremony_capacity_number">
<h4>Guest Capacity : </h4>
<?php the_field("location_ceremony_capacity_number"); ?>
</div>
<?php endif; ?>
</div>
// END PLATINUM
// GOLD
<div class="location_indv_post gold">
<div class="location-main-img-title">
<h3>
<a href="<?php the_permalink(); ?>"><?php the_title(); the_favorites_button(); ?></a>
</h3>
<a href="<?php the_permalink(); ?>">
<?php
$image1 = get_field('location_featured_image');
$size1 = 'full'; // (thumbnail, medium, large, full or custom size)
if( $image1 ) {
echo wp_get_attachment_image( $image1, $size1 );
}
?>
</a>
</div>
<?php if( get_field('location_view_type') ): ?>
<div class="location_view_type">
<h4>View Type: </h4>
<?php
$values = get_field('location_view_type');
if($values)
{
echo '<ul>';
foreach($values as $value)
{
echo '<li>' . $value . '</li>';
}
echo '</ul>';
}
?>
</div>
<?php endif; ?>
<?php if( get_field('location_ceremony_capacity_number') ): ?>
<div class="location_ceremony_capacity_number">
<h4>Guest Capacity: </h4>
<?php the_field("location_ceremony_capacity_number"); ?>
</div>
<?php endif; ?>
</div>
// END GOLD
// SILVER
<div class="location_indv_post silver">
<a href="<?php the_permalink(); ?>">
<div class="location-main-content-title">
<h3 style="color: #ffffff;">
<?php the_title(); the_favorites_button(); ?>
</h3>
<?php if( get_field('location_ceremony_capacity_number') ): ?>
<div class="location_ceremony_capacity_number">
<h4>Guest Capacity: </h4>
<?php the_field("location_ceremony_capacity_number"); ?>
</div>
<?php endif; ?>
</div>
</a>
<?php
$image1 = get_field('location_featured_image');
$size1 = 'full'; // (thumbnail, medium, large, full or custom size)
if( $image1 ) {
echo wp_get_attachment_image( $image1, $size1 );
}
?>
</div>
// END SILVER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment