Default featured image added
authorLaury GvR <laury@gaslightmedia.com>
Tue, 16 Apr 2019 21:13:55 +0000 (17:13 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 16 Apr 2019 21:13:55 +0000 (17:13 -0400)
assets/images/default-header.jpg [new file with mode: 0644]
page.php

diff --git a/assets/images/default-header.jpg b/assets/images/default-header.jpg
new file mode 100644 (file)
index 0000000..79b2707
Binary files /dev/null and b/assets/images/default-header.jpg differ
index b487778..73ec577 100644 (file)
--- a/page.php
+++ b/page.php
@@ -13,13 +13,21 @@ if ( ! defined( 'ABSPATH' ) ) {
 ?>
 <?php get_header(); ?>
 <?php if (is_page(12465)) {
-       echo "<br>Now we're on page 12465, Epicenter news";
+       // Now we're on page 12465, Epicenter news
        function modify_widget() {
                $r = array( 'cat' => '-70');
                return $r;
        }
        add_filter('widget_posts_args','modify_widget');
 } ?>
+
+<?php if ( 0 >= avada_number_of_featured_images() && !has_post_thumbnail()) { ?>
+       <div id="featured-image"
+               style='<?php echo "background-image: url('.get_template_directory_uri().'/assets/images-default-header.jpg);height:0;padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px;"?>'
+               class="post-slideshow">
+       </div>
+<?php } ?>
+</div>
 <section id="content" <?php Avada()->layout->add_style( 'content_style' ); ?>>
        <?php while ( have_posts() ) : ?>
                <?php the_post(); ?>