Reputation: 1
I want to remove the featured image in post and page, but keep it as thumbnail so that the site look good! My site is a wordpress based site.
Here's an example post of the site: http://www.tradingspotsilver.com/build-mt4-custom-ea-indicator-forex-free/
You could see that the featured image is on top of the post and occupy a lot of space. I've tried to look at the theme source but no luck.
Upvotes: 0
Views: 5495
Reputation: 1
It is obviously varies depending on theme.
For theme Freemium you need to remove the following lines in wp-content/themes/freemium/single.php:
<?php $freemium_feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); if($freemium_feat_image!="") { ?>
<img src="<?php echo $freemium_feat_image; ?>" alt="Banner" class="img-responsive img-responsive-freemium" />
<?php } ?>
Upvotes: 0
Reputation: 1
This is for the Dazzle Theme I found mine in "content-single.php and removed :
<?php the_post_thumbnail( 'dazzling-featured', array( 'class' => 'thumbnail' )); ?>
Picture was gone from post.
Upvotes: 0
Reputation: 2028
I had the same issue and i could not find any solution in single.php
Its simple although:
just comment:
from content.php page
Upvotes: 0
Reputation: 2528
check your single.php and content.php page to solve this problem its right there
if you dont require that code comment it / or modify it as you want. dont mess things go easy with it or otherwise you will end up getting error
Upvotes: 0
Reputation: 1
just remove the the_post_thumbnail
code in the single.php and page.php or content.php.
this function use in wordpress for show featured so just remove or comment it.
Upvotes: 0
Reputation: 146191
The link given in your question is a single post page, you look in to your theme's root folder and can find a file named single.php
, in that file you may find something like this
// "custom_size" could be anything like "single_page_image"
if ( has_post_thumbnail() ) : the_post_thumbnail('custom_size');
This line of code is responsible for showing the big image. Just remove this line and your image will not show up. Also, you may check this answer for custom image sizing.
For page template, you may look for a file named page.php
and look for the similar code.
Upvotes: 1
Reputation: 11
you can use timthumb for resizing:
with the code here: { https://code.google.com/p/timthumb/source/browse/trunk/timthumb.php }
create a file named timthumb.php in your theme folder, and at the place of the featured image php script, type:
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
//the_post_thumbnail();
$url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
<div class="img-hold"> <img src="<?php bloginfo('template_directory') ?>/timthumb.php?src=<?php echo $url; ?>&w=219&h=125" width="219" height="125" /></div>
<p><? }
echo $content;
?></p>
change the value of height and width as per your wish at &w=, &h= and also width= , height=
hope this helps
Upvotes: 0