Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //OUTPUT SECTION 1 POSTS
- $args = array( 'post_type' => 'section-1', 'posts_per_page' => 3 );
- $loop = new WP_Query( $args );
- while ( $loop->have_posts() ) :
- $loop->the_post();
- ?>
- <div class="post_introbox">
- <div class="post_titlebox">
- <h3 id="post-<?php echo the_ID() ?>">
- <a href="<?php echo the_permalink() ?>">
- <?php echo the_title() ?>
- </a>
- </h3>
- <p>
- <span>
- <?php echo get_the_author_link() ?>
- </span> · <?php echo the_date('m.d.Y') ?>
- </p>
- </div> //close titlebox
- <div class="containerz">
- <a href="<?php echo the_permalink() ?>"><?php
- add_image_size( 'front-featured', 374, 250, array( 'center', 'center' ) ); // Hard crop left top
- if ( has_post_thumbnail() ) {; // check if the post has a Post Thumbnail assigned to it.
- the_post_thumbnail( 'front-featured' );
- }
- ?></a>
- </div>
- <div class="section_link_box">
- <span class="section1">
- <a href="/blog/<?php get_post_type( $post ) ?>">
- <?php
- $category = get_the_category( $custompost );
- ?>
- <?php echo $category[0]->cat_name ?>
- </a>
- </span>
- </div>//CLOSE SECTION_LINK_BOX
- <div class="spacer_one"></div>
- <div class="introtext section1">
- <?php echo the_excerpt() ?>
- <p class="more">
- <a href="<?php echo the_permalink() ?>">
- Continue Reading
- </a>
- </p>
- <div class="clearfloat"></div>
- </div>
- </div> //close introtext
- <?php endwhile; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement