Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (is_front_page()) { ?>
- <?php
- $paged = get_query_var('page') ? get_query_var('page') : 1;
- $args = array (
- 'post_status' => 'publish',
- 'posts_per_page' => 10,
- 'paged' => $paged,
- 'meta_query' => array(
- array(
- 'key' => 'happenings_promoted',
- 'value' => 'Home (feed)'
- )
- )
- );
- $myquery = new WP_Query($args);
- while ($myquery->have_posts()) : $myquery->the_post(); ?>
- <div class="story_box post_feed">
- <a class="full_link" href="<?php echo the_permalink(); ?>"></a>
- <div class="clip_content">
- <a href="<?php echo the_permalink(); ?>"><h4>
- <?php
- $alternate_title = get_post_meta($post->ID, 'happenings_alternate_title', true);
- if ($alternate_title != '') {
- echo $alternate_title;
- } else {
- the_title();
- }
- ?>
- </h4>
- <?php
- $teaser = get_post_meta($post->ID, 'happenings_teaser', true);
- if ($teaser != '') { ?>
- <p><?php echo $teaser ?></p>
- <?php
- } else {
- the_excerpt();
- }
- if (has_post_thumbnail( $post->ID ) ) {
- $imgdata = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' );
- $fullWidth = $imgdata[1];
- if ( $fullWidth > 263 ) {
- echo get_the_post_thumbnail( $post->ID, 'thumbnail');
- }
- }
- ?>
- </div> <!-- close story_box -->
- <?php
- endwhile;
- posts_nav_link(' — ', __('« Newer Posts'), __('Older Posts »'));
- } else {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement