I want my feature image to stop appearing on the post, I simply want to use it as thumbnail on recent post.
before asking here I tried a lots of different solutions. I look for the responsible code in single.php but it was not there, I try to hide my feature image with CSS, when I check my site with firebug I notice that my CSS got overwritten by the orginal CSS, which does not happen normally.
After going through my code, I found this in template-tags.php
// Display Custom Header
if ( ! function_exists( 'dynamicnews_display_custom_header' ) ):
function dynamicnews_display_custom_header() {
// Check if page is displayed and featured header image is used
if( is_page() && has_post_thumbnail() ) :
?>
<div id="custom-header" class="featured-image-header">
<?php the_post_thumbnail('custom_header_image'); ?>
</div>
<?php
// Check if there is a custom header image
elseif( get_header_image() ) :
?>
<div id="custom-header">
<img src="<?php echo get_header_image(); ?>" />
</div>
<?php
endif;
}
endif;
// Display Postmeta Data
if ( ! function_exists( 'dynamicnews_display_postmeta' ) ):
function dynamicnews_display_postmeta() {
// Get Theme Options from Database
$theme_options = dynamicnews_theme_options();
// Display Date unless user has deactivated it via settings
if ( isset($theme_options['meta_date']) and $theme_options['meta_date'] == true ) : ?>
<span class="meta-date sep">
<?php printf(__('<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date published updated" datetime="%3$s">%4$s</time></a>', 'dynamicnewslite'),
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() )
);
?>
</span>
<?php endif;
I tried to remove some part of the code here, since I don't know anything about php, I get lots of error, I am hoping may be you guys can help me. I am using the theme dynamic news lite. here is the link to my site http://www.coolstuffgift.com/awesome-birthday-gifts-for-awesome-people/
Original code of Single.php
<?php get_header(); ?>
<div id="wrap" class="container clearfix">
<section id="content" class="primary" role="main">
<?php if (have_posts()) : while (have_posts()) : the_post();
get_template_part( 'content', 'single' );
endwhile;
endif; ?>
<?php comments_template(); ?>
</section>
<?php get_sidebar(); ?>
</div>
This is all I got in single.php I think the developer did some trick to hide the code.