Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The template used for displaying page content in page.php
- *
- * @package Catch Themes
- * @subpackage Catch_Box
- * @since Catch Box 1.0
- */
- ?>
- <?php
- $background = '';
- // check for a Featured Image and then assign it to a PHP variable for later use
- if ( has_post_thumbnail() ) {
- $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id());
- $background = 'background-image: url('.$featured_image[0].');';
- $background .= 'background-repeat: no-repeat;';
- $background .= 'background-size: cover;';
- $background .= 'background-position: center;';
- }
- ?>
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?> style="<?php echo $background; ?>">
- <header class="entry-header">
- <h1 class="entry-title"><?php the_title(); ?></h1>
- </header><!-- .entry-header -->
- <div class="entry-content">
- <?php the_content(); ?>
- <?php wp_link_pages( array(
- 'before' => '<div class="page-link"><span class="pages">' . __( 'Pages:', 'catch-box-pro' ) . '</span>',
- 'after' => '</div>',
- 'link_before' => '<span>',
- 'link_after' => '</span>',
- ) );
- ?>
- </div><!-- .entry-content -->
- <footer class="entry-meta">
- <?php edit_post_link( __( 'Edit', 'catch-box-pro' ), '<span class="edit-link">', '</span>' ); ?>
- </footer><!-- .entry-meta -->
- </article><!-- #post-<?php the_ID(); ?> -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement