Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Static Page with News
- */
- get_header(); ?>
- <main id="main" class="site-main" role="main">
- <div class="static">
- <!-- 1. Loop to display the static content -->
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
- <?php the_content(); ?>
- <?php endwhile; ?>
- <?php endif; ?>
- </div>
- <!-- 2. Show the last 10 Posts -->
- <h1><u><span style="color: #ff6600;">Latest News</span></u></h1>
- <?php query_posts('cat=0&showposts=10');?>
- <?php global $more; $more = 0; ?>
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <div class="archive-post-wrap">
- <?php
- /**
- * catchresponsive_before_entry_container hook
- *
- * @hooked catchresponsive_archive_content_image - 10
- */
- do_action( 'catchresponsive_before_entry_container' ); ?>
- <div class="entry-container">
- <header class="entry-header">
- <h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- <?php if ( 'post' == get_post_type() ) : ?>
- <?php catchresponsive_entry_meta(); ?>
- <?php endif; ?>
- </header><!-- .entry-header -->
- <?php
- $options = catchresponsive_get_theme_options();
- if ( is_search() || 'full-content' != $options['content_layout'] ) : // Only display Excerpts for Search and if 'full-content' is not selected ?>
- <div class="entry-summary">
- <?php the_excerpt(); ?>
- </div><!-- .entry-summary -->
- <?php else : ?>
- <div class="entry-content">
- <?php the_content(); ?>
- <?php
- wp_link_pages( array(
- 'before' => '<div class="page-links"><span class="pages">' . __( 'Pages:', 'catch-responsive-pro' ) . '</span>',
- 'after' => '</div>',
- 'link_before' => '<span>',
- 'link_after' => '</span>',
- ) );
- ?>
- </div><!-- .entry-content -->
- <?php endif; ?>
- <footer class="entry-footer">
- <?php catchresponsive_tag_category(); ?>
- </footer><!-- .entry-footer -->
- </div><!-- .entry-container -->
- </div><!-- .archive-post-wrap -->
- </article><!-- #post -->
- <?php endwhile; ?>
- <?php else : ?>
- <?php endif; ?>
- </main>
- <?php get_sidebar(); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement