- This topic has 22 replies, 2 voices, and was last updated 6 years, 5 months ago by
Mahesh.
-
AuthorPosts
-
May 23, 2017 at 2:05 am #116149
Gareth
Participanthi,
is there a way to include the featured image in the search results?
thank you
garethMay 23, 2017 at 7:07 am #116160Mahesh
Keymaster@rawikltd: The search result displays post with featured image by default. Please post in your site url.
Regards,
MaheshMay 24, 2017 at 10:40 pm #116283Gareth
Participanthi,
thanks for your message.
my site doesnt seem to. i probably have some setting wrong.
my site is https://hokkaidoguide.com/
thanks for any help!
gareth
May 25, 2017 at 2:33 am #116302Mahesh
Keymaster@rawikltd: Please try disabling the plugins and try if that fixes the issue.
Regards,
MaheshMay 25, 2017 at 3:58 am #116305Gareth
Participanthi,
i disabled all plugins and tried search and checked categories but still not image.
thanks
garethMay 25, 2017 at 3:59 am #116306Gareth
Participant#no
May 25, 2017 at 6:33 am #116312Mahesh
Keymaster@rawikltd: Please make sure you have set featured images on the posts.
Regards,
MaheshMay 26, 2017 at 1:39 am #116343Gareth
Participantevery post has a featured image. they are used in the slider and the ultimate list lists. also i have the widget which bans any post from being published without a featured image.
so definitely no problem there.
thanks
garethMay 26, 2017 at 6:39 am #116361Mahesh
Keymaster@rawikltd: Its kinda strange its not showing on your site. But working fine on our server. We’ll need to check on your server.
Regards,
MaheshMay 29, 2017 at 11:19 pm #116474Gareth
Participanthi mahesh,
ok how can i let you do that?
i did something last week that now shows the featured image in a huge form (now i cant remember what i did as ive been away for a few days)
anyway please let me know what you need to see whats happening.
thank you!
garethMay 30, 2017 at 12:52 am #116483May 30, 2017 at 1:19 am #116484Gareth
Participanthave sent you an email mahesh
i understood what i did – i just set content featured image. ive now disabled it.
May 30, 2017 at 4:58 am #116487Mahesh
Keymaster@rawikltd: Yes, I got your email. But the credentials were wrong I guess. I could not login.
Regards,
MaheshJune 4, 2017 at 9:28 pm #116727Gareth
Participanthi mahesh
sorry for my slow response, ive been away for a little bit.
ok i do apologize i shall check and resend.
thank you!
June 5, 2017 at 4:12 am #116740Mahesh
Keymaster@rawikltd: Thank you 🙂 I could access it and have corrected it. If you want to change it anytime, go to Dashboard=> Appearance=> Customize=> Theme Options=> Content Featured Image Option and select the image size you desire or disable to remove the featured image.
Regards,
MaheshJune 5, 2017 at 10:33 pm #116792Gareth
Participantright thanks
but is that the only way to do it?
as this places an image on the posts as well and i cant adjust the size for search only.
thnx
June 6, 2017 at 3:22 am #116809Mahesh
Keymaster@rawikltd: Well there is no such options to have image in search but not in posts. But you can use custom CSS for that. Go to Dashboard=> Appearance=> Customize=> Additional CSS box and add the following CSS:
/* Hide images in sinlge post */ .single-post #content .post .featured-image { display: none; } /* Make width of the image 200px in search page */ .search #content .post .featured-image { width: 200px; }
Regards,
MaheshJune 6, 2017 at 3:41 am #116810Gareth
Participantoooh, thats what im looking for!
yay.now, one more thing…
is it possible to have the title on the search results display Above the img?
thanks
June 6, 2017 at 11:49 pm #116869Mahesh
Keymaster@rawikltd: Add the following CSS:
.search-results #primary .post.has-post-thumbnail.hentry { position: relative; } .search-results #primary .post.hentry.has-post-thumbnail .entry-header { position: absolute; top: -50px; } .search-results #primary .post.has-post-thumbnail.hentry .featured-image { margin-top: 60px; }
Regards,
MaheshJune 7, 2017 at 1:24 am #116884Gareth
Participantthats great mahesh,
exactly what im looking for on the search page, however there is a slight problem in happy land.
this css also affects the posts. which places the title on my top area near the header with a line through it.
this may be because i have changed some of the header css too.
for example – https://hokkaidoguide.com/sapporo-clock-tower/ also looks much worse on the mobile telephone due to the squashed screen.is there any way to limit the above css to the search results page only?
should i add a generalized div with id to the search page perhaps??
any ideas?
thanks!
-
AuthorPosts
- The topic ‘Include featured image in search results’ is closed to new replies.