nycplugged on "Removing Featured Photos From Posts"

ساخت وبلاگ

fribblespoon86
Member
Posted 1 month ago #

Hey!

I was hoping to find an answer here.

I don't want the selected featured image inside of my posts - either on the home page or the actual post page.

Is it possible to remove it? I just want it for the thumbnail on "other posts you may like" section.

Thanks!

We can install one of these Custom CSS plugin
https://wordpress.org/plugins/search.php?q=custom+css

and use this code to display none, and be done with it

.home .entry-featured
.blog .entry-featured
.search .entry-featured
.archive .entry-featured
.single-post .entry-featured { display: none; }

but the downside is that the page might still the images in the source code wasting bandwidth, so the right way is to prevent the output in the source. We can do this by using a Child Theme and override the template.

For example this line #L29 to #25 in single.php is responsible for it
https://themes.trac.wordpress.org/browser/olsen-light/1.0.1/single.php#L29

So remove that part in our version of single.php of our Child Theme.

Hello.

Paul pretty much covered everything.

A couple of notes here. 1) most likely Paul meant to write lines 29 to 35 in the single.php (instead of 25) and 2)We have tested this plugin for custom CSS usage, it appears to be working fine with Olsen Light.

Additionally, if you choose go to the child theme way, you will need to edit the content-entry.php file as well and remove lines 21 to 27, this will remove featured images from the homepage as well.

Hello,

So I would just post this into my child theme? ( removing featured image from post and home page?)

.home .entry-featured
.blog .entry-featured
.search .entry-featured
.archive .entry-featured
.single-post .entry-featured { display: none; }

This will hide featured images from the entire site.

Ok great. So what did you mean by:

Additionally, if you choose go to the child theme way, you will need to edit the content-entry.php file as well and remove lines 21 to 27, this will remove featured images from the homepage as well.

Ignore it. You only need the styles in the custom CSS box or the child theme's style.css file.

Doesnt work I can still see the featured image...

Try just
.entry-featured { display: none; }

nycplugged
Member
Posted 11 hours ago #

no doesnt work...

nycplugged
Member
Posted 13 minutes ago #

Even better is there a way so when I social share a post it pulls the image I inserted into the text box with the title included? Cause even the title isn't showing when I share now.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 149 تاريخ : سه شنبه 31 فروردين 1395 ساعت: 20:50