• Resolved StinePingvin

    (@stinepingvin)


    I have tried removing the featured images from their respective posts. However, I cannot seem to find the specific code to remove. I have gone through every single file in the theme Snapshot. But it is not in any way apparent to me how this is done. Please help me?

    For clarity: I want to remove each featured image from the post and not from the main page.

Viewing 15 replies - 1 through 15 (of 19 total)
  • Are you using a child theme or a custom CSS plugin?

    Thread Starter StinePingvin

    (@stinepingvin)

    I am using a child theme.

    Site url?

    Thread Starter StinePingvin

    (@stinepingvin)

    Try removing:

    <?php if(has_post_thumbnail()) : the_post_thumbnail('post-thumbnail', array('class' => 'thumbnail')) ?>
    <?php else : ?><img src="<?php echo get_template_directory_uri() ?>/images/defaults/no-thumbnail.jpg" width="310" height="420" class="thumbnail" />
    <?php endif ?>

    from your child’s copy of loop.php

    Thread Starter StinePingvin

    (@stinepingvin)

    That removed the featured images altogether.

    Might there be a simple function to add in this loop, where it says something in the lines of: if this is a post, then do not display the thumbnail?

    Sorry if my question is very simple – I am still new at this

    That removed the featured images altogether.

    That’s what you indicated that you wanted in your original post. If that’s not the case, please clarify.

    Thread Starter StinePingvin

    (@stinepingvin)

    As i have written above, I want to remove the feature images from my POSTS – and I quote myself – “not from the main page“. I am sorry if this was not clear.

    Your Posts are all that is on the main posts page. Can you be a little more specific? Do you mean the single Post page?

    Thread Starter StinePingvin

    (@stinepingvin)

    If you click on one of my posts, you will see that the feature image is also displayed on there. However, this really looks bad and therefore, I want to remove the image from there.

    Thread Starter StinePingvin

    (@stinepingvin)

    Yeah, okay – now I get what you’re saying! ??

    Try removing:

    <?php elseif(has_post_thumbnail()) : ?>
    	<div id="post-single-viewer" class="image">
    		<div class="container">
    			<?php
    			$image = get_post_meta(get_the_ID(), 'snapshot_post_image', true);
    			$image = wp_parse_args($image, array(
    				'size' => 'single-large',
    				'url' => '',
    			));
    			if(!empty($image['url'])) echo '<a href="'.esc_url($image['url']).'">';
    			echo wp_get_attachment_image(get_post_thumbnail_id(), $image['size'], false, array('class' => 'single-image'));
    			if(!empty($image['url'])) echo '</a>';
    			?>
    		</div>
    	</div>

    from your child theme’s copy of viewer.php

    Thread Starter StinePingvin

    (@stinepingvin)

    You, my friend, are a genius! Thank you ??

    You wouldn’t happen to have an idea of how to remove the black “box” that goes across the webpage? It’s supposed to have a title on it, but I want my page to be as simple as possible. I tried going through the images through FTP. However, none of the images match this black box. So I must assume it is defined in one of the files – and again, I cannot locate it.

    Sorry – that would take a lot more hunting down. I don’t actually have any connection with the theme (I don’t even have a copy installed). I’ve been looking at the SVN copies of the theme’s files and that only works for relatively simple things.

    Thread Starter StinePingvin

    (@stinepingvin)

    That’s okay.

    But the code I deleted actually didn’t solve the problem, I can see now ?? The image is either removed or scaled by some rule not defined in viewer.php

    But I guess I am further with the project than I was before!

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Remove featured image from post?’ is closed to new replies.