0

I'm currently working with a wordpress theme, where the homepage is set to show all the latest posts. All my posts are showing thumbnails, even tho i dont set an featured image in my posts.

It takes the first image in my post, and use it for thumbnail, but i dont want it to do that. The thumbnail should only be shown when i set it as featured image in a post.

So my question is: How can i remove the function that automatically shows the first image as thumbnail, and make it use my featured image in my posts.

Link to my website: http://bruunoggejl.dk

Thank you!

1
  • I ran into another problem now. I'd like the post thumbnails on my frontpage, to show in 100% width. They are currently showing in 35%. When i'm editing the css and make it to 100%, the images sure are showing in 100% width, but the image the resolution doesn't scale up with. It's like wordpress is trying to make a 150x150 image thumbnail, show as a 700x700 image. It looks terrible. I have tried a few things but it either seems to break my site, or not doing anything. Any suggestions? All help is appreciated, thanks.
    – Kasper
    Oct 15, 2015 at 15:44

1 Answer 1

1

Replace get_the_image function

get_the_image( array( 'meta_key' => ...

For the_post_thumbnail function:

the_post_thumbnail( $size, $attr );
4
  • Thank you very much Maarten, just what i was looking for :-)
    – Kasper
    Sep 27, 2015 at 16:44
  • You're welcome, please vote up my answer :) Sep 27, 2015 at 17:06
  • @KasperTangHøjriis please see "What should I do when someone answers my question?" Sep 28, 2015 at 8:31
  • I really want to vote up, and i have already tried. But i don't have enough reputation to vote up.. And yes i do know it's only decent to vote up, and show other members that i have found a solid solution, but it's not easy without the reputation :-)
    – Kasper
    Sep 28, 2015 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.