Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: TotallyNew
- */
- ?>
- <?php get_header(); ?>
- <div id="centered-section">
- <div id="intro-section">
- <?php the_block("TestBlock", array("type" => "one-liner")); ?>
- <?php the_block("TestBlock3", array("type" => "one-liner")); ?>
- <div id="intro-caption-1" class="intro-caption">
- <?php the_block("Caption 1", array("type" => "one-liner")); ?>
- </div>
- <div id="intro-caption-2" class="intro-caption">
- <?php the_block("Caption 2", array("type" => "one-liner")); ?>
- </div>
- <?php $random_count = 0;
- $randomposts = get_posts( "category_name=Articles&orderby=rand&numberposts=3" );
- foreach($randomposts as $post) {
- setup_postdata($post); ?>
- <a href="<?php echo get_permalink(); ?>">
- <?php the_post_thumbnail('medium', array('class' => 'circle-image', 'id' => 'circle'.$random_count));
- $random_count += 1;
- ?>
- </a>
- <?php } ?>
- <div id="circle-logo" class="circle-image"></div>
- <div id="intro-text">
- <?php while ( have_posts() ) : the_post(); ?>
- <?php the_content(); ?>
- <?php endwhile; // end of the loop. ?>
- </div>
- <a href="./articles">
- <div id="intro-button">
- Discover the TrowelBlazers
- <img src="<?php bloginfo('template_url');?>/images/arrow_right.png" class="arrow-right" alt="">
- </div>
- </a>
- </div>
- <div id="latest-section">
- <?php
- $lastposts = get_posts( "category_name=Articles&numberposts=1" );
- foreach($lastposts as $post) : setup_postdata($post); ?>
- <?php the_post_thumbnail('medium', array('id' => 'latest-image')); ?>
- <div id="latest-header">
- Latest Article
- </div>
- <div id="latest-text">
- <p id="latest-title"><?php the_title(); ?></p>
- <p><?php echo $trimmed = wp_trim_words( $text = get_the_content(), $num_words = 120); ?></p>
- <a href="<?php the_permalink(); ?>">
- <div id="latest-button" class="read-more">
- Read More
- </div>
- </a>
- </div>
- <?php endforeach; ?>
- </div>
- <div id="sub-section">
- <?php
- $lastposts = get_posts( "category_name=Blog&numberposts=1" );
- foreach($lastposts as $post) : setup_postdata($post);
- $sub_box_image_id = get_post_thumbnail_id();
- $sub_box_image = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'blog-image' );
- $sub_box_image_url = $sub_box_image['0']; ?>
- <div id="sub-box-left" class="sub-box">
- <a href="<?php echo home_url(); ?>/blog">
- <div class="sub-box-title">
- What We're Up To
- </div>
- </a>
- <div id="sub-box-image-blog" class="sub-box-image" style="background: url('<?php echo $sub_box_image_url; ?>');"></div>
- <div class="sub-box-subtitle">
- <a href="<?php echo home_url(); ?>/blog"><?php the_title(); ?></a>
- </div>
- <div class="sub-box-text">
- <p><?php echo $trimmed = wp_trim_words( $text = get_the_content(), $num_words = 60); ?></p>
- <a href="<?php echo home_url(); ?>/blog">
- <div id="latest-button" class="read-more">
- Read More
- </div>
- </a>
- </div>
- </div>
- <?php endforeach; ?>
- <div id="sub-box-right" class="sub-box">
- <a href="<?php echo home_url(); ?>/community">
- <div class="sub-box-title">
- Community
- </div>
- </a>
- <div id="sub-box-image-community" class="sub-box-image"></div>
- <div class="sub-box-subtitle">
- <a href="<?php echo home_url(); ?>/community"><?php the_block("Community Subtitle", array("type" => "one-liner")); ?></a>
- </div>
- <div class="sub-box-text">
- <?php the_block("Community Text"); ?>
- </div>
- </div>
- </div>
- <div id="random-articles-section">
- <div id="random-divider" class="title-divider">
- <div class="double-divider"></div>
- <div class="title-bar">
- Recent Articles
- </div>
- <div class="double-divider double-divider-right"></div>
- </div>
- <div id="browse-boxes">
- <?php
- $lastposts = get_posts( "category_name=Articles&numberposts=4" );
- foreach($lastposts as $post) : setup_postdata($post);
- $browse_image_url = kd_mfi_get_featured_image_url( 'featured-image-2', 'post', 'thumbnail' ); ?>
- <a href="<?php the_permalink(); ?>">
- <div class="browse-box" style="background: url('<?php echo $browse_image_url; ?>');">
- <div class="browse-title">
- <?php the_title(); ?>
- </div>
- </div>
- </a>
- <?php endforeach; ?>
- </div>
- </div>
- <?php the_block("TestBlock2", array("type" => "one-liner")); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement