• Love this theme but have a quick question. Is it possible to remove the ‘featured image’ functionality, or make it optional? I don’t have images for all my posts and prefer not to see the ‘no image available’ image on all posts w/o an image. Thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • hi,
    it’s nice site which articles illustrated with images, it is better to have a default image

    // Checks if "Post_Thumbnail" is related to article
        if( has_post_thumbnail() ) {
        // Display Post_Thumbnail
        the_post_thumbnail();
    
        } else {
        // Otherwise your default image
        echo '<img src="' . get_bloginfo('template_directory') . '/images/default_post_thumb.jpg" alt="" />';
    
        }

    But if you do not post_thumbnail you have a square?
    if yes then it’s style.css

    .entry-content img, .comment-content img, .main .widget img, img.header-image, #author-avatar img, img.wp-post-image {
        background: none repeat scroll 0 0 #F3F3F3;
        border: 1px solid #E1E1E1;
        padding: 4px;
    }

    to none in background and border

    Thread Starter warmestregards

    (@warmestregards)

    Thanks, I’ll see what that does.

    This doesn’t answer the question. Can we just get rid of the image and slider on the front page and have it start with the first post?

    Tom

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    If you’re unsatisfied with the level of support provided by WordPress.org forums, consider hiring someone at http://jobs.wordpress.net .

    Otherwise create your own thread if you want to discuss your own issue.

    Hello,
    must remove the code for the slider in home.php

    <?php /********* Slider Section. *********/ ?>
    
    				<div id="iview">
    
    					<?php
    						if ( ! isset( $options['leaf_slider_cat']) || $options['leaf_slider_cat'] == -1 ) {
    							$args = ( array( 'posts_per_page' => 5, 'post__not_in' => get_option( 'sticky_posts' ) ) );
    						} else {
    							$args = ( array( 'posts_per_page' => 5, 'category__in' => $options['leaf_slider_cat'], 'post__not_in' => get_option( 'sticky_posts' ) ) );
    						}
    					?>  
    
    					<?php $loop = new WP_Query( $args ); ?>
    
    					<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
    
    						<?php $no_duplicates[] = get_the_ID(); ?>
    
    						<a href="<?php the_permalink(); ?>" data-iview:image="<?php echo leaf_get_post_image( null,null,true,null, 'slider' ); ?>">
    							<span class="iview-caption caption3" data-x="15" data-y="212" data-transition="expandright"><h2><?php the_title(); ?></h2></span>
    							<span class="iview-caption caption1" data-x="15" data-y="258" data-transition="expandleft"><?php echo '<p>' . wp_trim_words( get_the_excerpt(), 35, null ) . '</p>'; ?></span>
    						</a>
    
    					<?php endwhile; ?>
    
    				</div><!-- #iview -->

    if you do not post_thumbnail when creating an article, you do not have an image.
    you should see that while the framework created by the sheet style.css.

    After not choose the options of the theme category for the home page, and you will see the latest articles

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Disable 'Featured Image'?’ is closed to new replies.