Viewing 15 replies - 1 through 15 (of 16 total)
  • In page.php, remove the line that says:

    <?php get_template_part('inc/page-image'); ?>

    With a child theme.

    Edit: It actually seems like this is a post and not a page? So the page-image should not be included by default, unless you added it there in single.php.

    Thread Starter Muhammad Haroon

    (@muhammadharoon)

    Still the image is available. What now?

    Are you using Image format post for the post? Select Standard format and no thumbnail should appear.

    Thread Starter Muhammad Haroon

    (@muhammadharoon)

    I’m using Standard Post Format, but still the thumbnail is appearing. What should I do Alex??? Please help me.

    In single.php, do you have any line which says:

    <?php get_template_part('inc/page-image'); ?>

    If so, remove it. It should not be there by default, unless you’ve added it there.

    Thread Starter Muhammad Haroon

    (@muhammadharoon)

    Unfortunately, no such code is available in single.php.

    When inspecting the code of the page, I can see that both the homepage and the single page has:

    <div class="page-image">-stuff here-</div>

    Which does not exist in the theme by default. So, you must have made customizations. I can not tell what you shall remove, as I don’t know what you’ve added.

    Hi…

    I seem to have the same “issue”. I really like “Hueman”, but I’m not too excited about the big featured images on the front page (https://hassehorslund.com/)

    I would really like to be able to remove these – if I simply don’t set a featured image for the post, I wind up with a big grey rectangle.

    I can’t find anywhere in the theme options how to remove the featured images?

    Not really the same issue, as it relates to featured image vs page image, but to remove the featured default image from articles:

    Modify content.php with a child theme. Locate:

    <img src="<?php echo get_template_directory_uri(); ?>/img/thumb-medium.png" alt="<?php the_title(); ?>" />

    And remove it.

    Great success!

    Thank you ??

    I am not sure if it’s exactly the same problem but I’d like to remove the big image (on pages) which shows above the content. It’s simply to big and for some reason it shows the image+alt text in the middle. I’ve tried the codes you posted earlier in this topic but none worked:/
    My site is joggyoga.com and you can see what I mean if you got joggyoga.com/jogging

    @letrero:
    You want to remove (ideally in a copy within your child theme)
    line :9 from content-featured.php:

    <img src="<?php echo get_template_directory_uri(); ?>/img/thumb-medium.png" alt="<?php the_title(); ?>" />

    @alexander: I think we should get a theme-wide: [x]never show default thumbnails option… ??

    How do you remove the featured image from just one, particular post?

    I’ve added the CSS Plus plugin to have the custom CSS field in my post and had added the wp_head tag as instructed to the header.php.

    However, I just need to remove the Featured Image from certain posts (I still want those images as thumbnails in my Blog/Home Page, though) and thought I could do it through custom css through CSS Plus.

    I’ve found lots of CSS code examples which claim to ‘hide’ the featured image, and I’ve tried them through and through without much success.

    I think I might need the right CSS for an image post to be able to properly hide the featured image.

    Any advice/suggestions?

    I checked this stackoverflow post about this:

    how-to-hide-featured-image-from-some-posts

    For Hueman, I believe I have to go into post-formats.php to edit it correctly.

    Am I right?

    I believe I figured it out, here’s my post-formats.php code, look under image post for the insert of:

    <?php $shouldHideFeaturedImage = get_post_meta($post->ID, ‘hide_featured_image’, true);
    if ( $shouldHideFeaturedImage != ‘yes’ ) { ?>

    Here’s the whole thing:

    <?php $meta = get_post_custom($post->ID); ?>
    
    <?php if ( has_post_format( 'audio' ) ): // Audio ?>
    
    	<?php $formats = array();
    		foreach ( explode('|','mp3|ogg') as $format ) {
    			if ( isset($meta['_audio_'.$format.'_url']) ) {
    				$format = ($format=='ogg')?'oga':$format;
    				// Change mp3 to m4a if necessary
    				if ( $format == 'mp3' ) {
    					if ( strstr($meta['_audio_mp3_url'][0],'.m4a') ) {
    						$format = 'm4a';
    					}
    				}
    				$formats[] = $format;
    			}
    		}
    	?>
    
    	<?php if ( !empty($formats) ): ?>
    	<script type="text/javascript">
    	jQuery(document).ready(function(){
    		if(jQuery().jPlayer) {
    			jQuery("#jquery-jplayer-<?php the_ID(); ?>").jPlayer({
    				ready: function () {
    					jQuery(this).jPlayer("setMedia", {
    						<?php if(in_array('mp3',$formats)) { echo 'mp3: "'.$meta['_audio_mp3_url'][0].'",'."\n"; } ?>
    						<?php if(in_array('m4a',$formats)) { echo 'm4a: "'.$meta['_audio_mp3_url'][0].'",'."\n"; } ?>
    						<?php if(in_array('oga',$formats)) { echo 'oga: "'.$meta['_audio_ogg_url'][0].'",'."\n"; } ?>
    					});
    				},
    				swfPath: "<?php echo get_template_directory_uri() ?>/js",
    				cssSelectorAncestor: "#jp-interface-<?php the_ID(); ?>",
    				supplied: "<?php echo implode(',',$formats); ?>"
    			});
    		}
    	});
    	</script>
    	<?php endif; ?>
    
    	<div class="post-format">
    		<div class="image-container">
    			<?php if ( has_post_thumbnail() ) {
    				the_post_thumbnail('thumb-large');
    				$caption = get_post(get_post_thumbnail_id())->post_excerpt;
    				if ( isset($caption) && $caption ) echo '<div class="image-caption">'.$caption.'</div>';
    			} ?>
    		</div>
    
    		<div id="jquery-jplayer-<?php the_ID(); ?>" class="jp-jplayer"></div>
    
    		<div class="jp-audio">
    			<div id="jp-interface-<?php the_ID(); ?>" class="jp-interface">
    				<ul class="jp-controls">
    					<li><a href="#" class="jp-play" tabindex="1"><i class="fa fa-play"></i></a></li>
    					<li><a href="#" class="jp-pause" tabindex="1"><i class="fa fa-pause"></i></a></li>
    					<li><a href="#" class="jp-mute" tabindex="1"><i class="fa fa-volume-up"></i></a></li>
    					<li><a href="#" class="jp-unmute" tabindex="1"><i class="fa fa-volume-down"></i></a></li>
    				</ul>
    				<div class="jp-progress-container">
    					<div class="jp-progress">
    						<div class="jp-seek-bar">
    							<div class="jp-play-bar"></div>
    						</div>
    					</div>
    				</div>
    				<div class="jp-volume-bar-container">
    					<div class="jp-volume-bar">
    						<div class="jp-volume-bar-value"></div>
    					</div>
    				</div>
    			</div>
    		</div>
    
    	</div>
    
    <?php endif; ?>
    
    <?php if ( has_post_format( 'gallery' ) ): // Gallery ?>
    
    	<div class="post-format">
    		<?php $images = alx_post_images(); if ( !empty($images) ): ?>
    		<script type="text/javascript">
    			// Check if first slider image is loaded, and load flexslider on document ready
    			jQuery(document).ready(function(){
    			 var firstImage = jQuery('#flexslider-<?php echo the_ID(); ?>').find('img').filter(':first'),
    				checkforloaded = setInterval(function() {
    					var image = firstImage.get(0);
    					if (image.complete || image.readyState == 'complete' || image.readyState == 4) {
    						clearInterval(checkforloaded);
    						jQuery('#flexslider-<?php echo the_ID(); ?>').flexslider({
    							animation: "fade",
    							slideshow: true,
    							directionNav: true,
    							controlNav: true,
    							pauseOnHover: true,
    							slideshowSpeed: 7000,
    							animationSpeed: 600,
    							smoothHeight: true,
    							touch: false
    						});
    					}
    				}, 20);
    			});
    		</script>
    		<div class="flex-container">
    			<div class="flexslider" id="flexslider-<?php the_ID(); ?>">
    				<ul class="slides">
    					<?php foreach ( $images as $image ): ?>
    						<li>
    							<?php $imageid = wp_get_attachment_image_src($image->ID,'large'); ?>
    							<img src="<?php echo $imageid[0]; ?>" alt="<?php echo $image->post_title; ?>">
    
    							<?php if ( $image->post_excerpt ): ?>
    								<div class="image-caption"><?php echo $image->post_excerpt; ?></div>
    							<?php endif; ?>
    						</li>
    					<?php endforeach; ?>
    				</ul>
    			</div>
    		</div>
    		<?php endif; ?>
    	</div>
    
    <?php endif; ?>
    
    <?php if ( has_post_format( 'image' ) ): // Image ?>
    
    	<div class="post-format">
    		<div class="image-container">
    			<?php if ( has_post_thumbnail() ) {
    				$shouldHideFeaturedImage = get_post_meta($post->ID, 'hide_featured_image', true);
    				if ( $shouldHideFeaturedImage != 'yes' )
    				the_post_thumbnail('thumb-large');
    				$caption = get_post(get_post_thumbnail_id())->post_excerpt;
    				if ( isset($caption) && $caption ) echo '<div class="image-caption">'.$caption.'</div>';
    			} ?>
    		</div>
    	</div>
    
    <?php endif; ?>
    
    <?php if ( has_post_format( 'video' ) ): // Video ?>
    
    	<div class="post-format">
    		<?php
    			if ( isset($meta['_video_url'][0]) && !empty($meta['_video_url'][0]) ) {
    				global $wp_embed;
    				$video = $wp_embed->run_shortcode('[embed]'.$meta['_video_url'][0].'[/embed]');
    				echo $video;
    			} elseif ( isset($meta['_video_embed_code'][0]) && !empty($meta['_video_embed_code'][0]) ) {
    				echo '<div class="video-container">';
    				echo $meta['_video_embed_code'][0];
    				echo '</div>';
    			}
    		?>
    	</div>
    
    <?php endif; ?>
    
    <?php if ( has_post_format( 'quote' ) ): // Quote ?>
    
    	<div class="post-format">
    		<div class="format-container pad">
    			<i class="fa fa-quote-right"></i>
    			<blockquote><?php echo isset($meta['_quote'][0])?wpautop($meta['_quote'][0]):''; ?></blockquote>
    			<p class="quote-author"><?php echo (isset($meta['_quote_author'][0])?'&mdash; '.$meta['_quote_author'][0]:''); ?></p>
    		</div>
    	</div>
    
    <?php endif; ?>
    
    <?php if ( has_post_format( 'chat' ) ): // Chat ?>
    
    	<div class="post-format">
    		<div class="format-container pad">
    			<i class="fa fa-comments-o"></i>
    			<blockquote>
    				<?php echo (isset($meta['_chat'][0])?wpautop($meta['_chat'][0]):''); ?>
    			</blockquote>
    		</div>
    	</div>
    
    <?php endif; ?>
    
    <?php if ( has_post_format( 'link' ) ): // Link ?>
    
    	<div class="post-format">
    		<div class="format-container pad">
    			<p><a href="<?php echo (isset($meta['_link_url'][0])?$meta['_link_url'][0]:'#'); ?>">
    				<i class="fa fa-link"></i>
    				<?php echo (isset($meta['_link_title'][0])?$meta['_link_title'][0]:get_the_title()); ?> &rarr;
    			</a></p>
    		</div>
    	</div>
    
    <?php endif; ?>
Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘I want to remove the featured image from posts’ is closed to new replies.