Site logo

Archived topic

How to change the featured image?

7 replies · Started by Pete on February 9, 2015

Viewing posts 1–8 of 8

Ok... it seems the featured image in the archives/search/author etc pages is placed by using the <?php do_action( 'generate_after_entry_header'); ?> hook and by use of a function in functions.php

So, how do I edit this featured image if I create category.php or taxonomy-xyz.php or if I want to edit the image for the author or search archive pages?

There shouldn't actually be a featured image for any of those pages as they don't have physical pages where you can add the image - they're just created by WordPress.

Do you have images showing up on this pages?

The images showing inside each listed post is the image set for that specific post.

inc/template-tags.php line 268 "Prints the Post Image to post excerpts". How can this be disabled?

Adding this to your code snippets should work:

remove_action( 'generate_after_entry_header', 'generate_post_image' );

That didn't remove it ?

This did...
.inside-article .post-image a img.attachment-post-thumbnail.wp-post-image {display:none;}

Then I gave my own featured image code it's own classes

Hi Tom, I'm trying to get your GP template to work and am having trouble setting a feature image only to the homepage. By feature image I would like it to be the entire width of the page... is this possible? Kindly, ER

ok. Nevermind. Thanks for this superb template, Tom. Kindly, ER

Glad you both found solutions :)

This archived topic is closed to new replies.