How to hide the special picture in the single post view?

March 2014 WordPress Theme
GK User
Thu Jul 24, 2014 1:43 pm
Hi,

How can I remove the special image/picture in the single post view? Thanks.
It must be somewhere in the single page view template source.
User avatar
Junior Boarder

GK User
Fri Jul 25, 2014 8:34 am
Hello,

Please open the layouts/content.post.featured.php file and please change the following fragment:

Code: Select all
<?php if((is_single() || is_page()) && $params_image == 'Y') : ?>
      <?php if(has_post_thumbnail()) : ?>
      <figure class="featured-image">
         <?php if(is_sticky()) : ?>
         <sup>
            <?php _e( 'Featured', GKTPLNAME ); ?>
         </sup>
         <?php endif; ?>
         
         <?php the_post_thumbnail(); ?>
         
         <?php if(is_single() || is_page()) : ?>
            <?php echo gk_post_thumbnail_caption(); ?>
         <?php endif; ?>
      </figure>
      <?php
         // if there is a Featured Video
         elseif(get_post_meta(get_the_ID(), "_gavern-featured-video", true) != '') :
      ?>
      <div class="gk-video-wrap">
      <?php echo get_post_meta(get_the_ID(), "_gavern-featured-video", true); ?>
      </div>
      <?php endif; ?>
      
   <?php elseif(!(is_single() || is_page())) : ?>
      <?php if($params_image == 'Y') : ?>
         <?php if(has_post_thumbnail()) : ?>
         <figure class="featured-image">
            <?php if(is_sticky()) : ?>
            <sup>
               <?php _e( 'Featured', GKTPLNAME ); ?>
            </sup>
            <?php endif; ?>
            
            <a href="<?php the_permalink(); ?>">
            <?php the_post_thumbnail(); ?>
            </a>
            
            <?php if(is_single() || is_page()) : ?>
               <?php echo gk_post_thumbnail_caption(); ?>
            <?php endif; ?>
         </figure>
         <?php
            // if there is a Featured Video
            elseif(get_post_meta(get_the_ID(), "_gavern-featured-video", true) != '') :
         ?>
         <div class="gk-video-wrap">
         <?php echo get_post_meta(get_the_ID(), "_gavern-featured-video", true); ?>
         </div>
         <?php endif; ?>
      <?php endif; ?>
   <?php endif; ?>


to:

Code: Select all
<?php if(!is_singular()) : ?>
    <?php if((is_single() || is_page()) && $params_image == 'Y') : ?>
      <?php if(has_post_thumbnail()) : ?>
      <figure class="featured-image">
         <?php if(is_sticky()) : ?>
         <sup>
            <?php _e( 'Featured', GKTPLNAME ); ?>
         </sup>
         <?php endif; ?>
         
         <?php the_post_thumbnail(); ?>
         
         <?php if(is_single() || is_page()) : ?>
            <?php echo gk_post_thumbnail_caption(); ?>
         <?php endif; ?>
      </figure>
      <?php
         // if there is a Featured Video
         elseif(get_post_meta(get_the_ID(), "_gavern-featured-video", true) != '') :
      ?>
      <div class="gk-video-wrap">
      <?php echo get_post_meta(get_the_ID(), "_gavern-featured-video", true); ?>
      </div>
      <?php endif; ?>
      
   <?php elseif(!(is_single() || is_page())) : ?>
      <?php if($params_image == 'Y') : ?>
         <?php if(has_post_thumbnail()) : ?>
         <figure class="featured-image">
            <?php if(is_sticky()) : ?>
            <sup>
               <?php _e( 'Featured', GKTPLNAME ); ?>
            </sup>
            <?php endif; ?>
            
            <a href="<?php the_permalink(); ?>">
            <?php the_post_thumbnail(); ?>
            </a>
            
            <?php if(is_single() || is_page()) : ?>
               <?php echo gk_post_thumbnail_caption(); ?>
            <?php endif; ?>
         </figure>
         <?php
            // if there is a Featured Video
            elseif(get_post_meta(get_the_ID(), "_gavern-featured-video", true) != '') :
         ?>
         <div class="gk-video-wrap">
         <?php echo get_post_meta(get_the_ID(), "_gavern-featured-video", true); ?>
         </div>
         <?php endif; ?>
      <?php endif; ?>
   <?php endif; ?>
<?php endif; ?>
User avatar
Administrator

GK User
Sat Aug 09, 2014 10:31 am
dziudek wrote:Hello,

Please open the layouts/content.post.featured.php file and please change the following fragment:

Code: Select all
<?php if((is_single() || is_page()) && $params_image == 'Y') : ?>
      <?php if(has_post_thumbnail()) : ?>
      <figure class="featured-image">
         <?php if(is_sticky()) : ?>
         <sup>
            <?php _e( 'Featured', GKTPLNAME ); ?>
         </sup>
         <?php endif; ?>
         
         <?php the_post_thumbnail(); ?>
         
         <?php if(is_single() || is_page()) : ?>
            <?php echo gk_post_thumbnail_caption(); ?>
         <?php endif; ?>
      </figure>
      <?php
         // if there is a Featured Video
         elseif(get_post_meta(get_the_ID(), "_gavern-featured-video", true) != '') :
      ?>
      <div class="gk-video-wrap">
      <?php echo get_post_meta(get_the_ID(), "_gavern-featured-video", true); ?>
      </div>
      <?php endif; ?>
      
   <?php elseif(!(is_single() || is_page())) : ?>
      <?php if($params_image == 'Y') : ?>
         <?php if(has_post_thumbnail()) : ?>
         <figure class="featured-image">
            <?php if(is_sticky()) : ?>
            <sup>
               <?php _e( 'Featured', GKTPLNAME ); ?>
            </sup>
            <?php endif; ?>
            
            <a href="<?php the_permalink(); ?>">
            <?php the_post_thumbnail(); ?>
            </a>
            
            <?php if(is_single() || is_page()) : ?>
               <?php echo gk_post_thumbnail_caption(); ?>
            <?php endif; ?>
         </figure>
         <?php
            // if there is a Featured Video
            elseif(get_post_meta(get_the_ID(), "_gavern-featured-video", true) != '') :
         ?>
         <div class="gk-video-wrap">
         <?php echo get_post_meta(get_the_ID(), "_gavern-featured-video", true); ?>
         </div>
         <?php endif; ?>
      <?php endif; ?>
   <?php endif; ?>


to:

Code: Select all
<?php if(!is_singular()) : ?>
    <?php if((is_single() || is_page()) && $params_image == 'Y') : ?>
      <?php if(has_post_thumbnail()) : ?>
      <figure class="featured-image">
         <?php if(is_sticky()) : ?>
         <sup>
            <?php _e( 'Featured', GKTPLNAME ); ?>
         </sup>
         <?php endif; ?>
         
         <?php the_post_thumbnail(); ?>
         
         <?php if(is_single() || is_page()) : ?>
            <?php echo gk_post_thumbnail_caption(); ?>
         <?php endif; ?>
      </figure>
      <?php
         // if there is a Featured Video
         elseif(get_post_meta(get_the_ID(), "_gavern-featured-video", true) != '') :
      ?>
      <div class="gk-video-wrap">
      <?php echo get_post_meta(get_the_ID(), "_gavern-featured-video", true); ?>
      </div>
      <?php endif; ?>
      
   <?php elseif(!(is_single() || is_page())) : ?>
      <?php if($params_image == 'Y') : ?>
         <?php if(has_post_thumbnail()) : ?>
         <figure class="featured-image">
            <?php if(is_sticky()) : ?>
            <sup>
               <?php _e( 'Featured', GKTPLNAME ); ?>
            </sup>
            <?php endif; ?>
            
            <a href="<?php the_permalink(); ?>">
            <?php the_post_thumbnail(); ?>
            </a>
            
            <?php if(is_single() || is_page()) : ?>
               <?php echo gk_post_thumbnail_caption(); ?>
            <?php endif; ?>
         </figure>
         <?php
            // if there is a Featured Video
            elseif(get_post_meta(get_the_ID(), "_gavern-featured-video", true) != '') :
         ?>
         <div class="gk-video-wrap">
         <?php echo get_post_meta(get_the_ID(), "_gavern-featured-video", true); ?>
         </div>
         <?php endif; ?>
      <?php endif; ?>
   <?php endif; ?>
<?php endif; ?>


Hello dziudek,

thanks, it works!
User avatar
Junior Boarder


cron