Tagged: Blog, featured image
-
AuthorPosts
-
October 3, 2017 at 11:40 pm #859828
I’ve tried some CSS to remove the featured image from blog posts. However, can you please tell me what code I should remove in order to not display the featured image on the blog index, blog tag list page, blog category page? Thank you so much!
October 3, 2017 at 11:52 pm #859834Hey newpappa,
So you don’t want featured images on any of the blog pages?
Best regards,
Jordan ShannonOctober 4, 2017 at 12:01 am #859839Correct. We’ve found that we prefer embedding images into the posts directly (as well as not using the advanced layout building for blog posts), which gives us better control over the image. The only time we intend featured images to be used is by Facebook when we post links there.
October 4, 2017 at 1:57 am #859851Any ideas?
October 4, 2017 at 3:42 am #859858Hi,
Add the following to quick css:
.archive img.size-full, .wp-caption-text{ display:none!important; }
Best regards,
Jordan ShannonOctober 4, 2017 at 4:48 am #859872Hi Jordan,
Thanks for quick response. That removes the image that I want to keep, on just the archive page, and uses CSS.
For the time being, I’ve added this CSS:
.archive .small-preview{
display:none!important;
}However, I’d like to remove it in the code rather than using CSS. Any ideas on how to do that?
Thanks so much.
October 4, 2017 at 11:13 pm #860349Hi,
Would you like to not display them at all or display only on single posts?
Best regards,
YigitOctober 5, 2017 at 12:49 am #860359Hi Yigit,
Thanks for the response. We’d like to not display them anywhere.
Best regards
October 5, 2017 at 11:36 pm #860778Hi,
Please provide admin info so we can login and access the functions.php file.
Best regards,
Jordan ShannonOctober 10, 2017 at 12:01 am #862191This reply has been marked as private.October 10, 2017 at 5:47 am #862264Hi,
I would need to see the page within the environment it will be used to prevent errors being thrown.
Best regards,
Jordan ShannonOctober 10, 2017 at 5:47 am #862265Hi,
Could FTP info be shared?
Best regards,
Jordan ShannonOctober 22, 2017 at 2:37 pm #867192Hi!
To remove featured images from all post page please try this code in your functions.php
//-------------------------------------------------------- // PHP function - Remove featured image on all post page //-------------------------------------------------------- function wordpress_hide_feature_image( $html, $post_id, $post_image_id ) { return is_single() ? '' : $html; } // add the filter add_filter( 'post_thumbnail_html', 'wordpress_hide_feature_image', 10, 3);
Best regards,
VinayFebruary 19, 2020 at 9:15 pm #1186178This crashes my site???
February 21, 2020 at 6:48 pm #1186842Hey janton1,
Did you add the code to the very bottom of functions.php? Also, please provide a link to your site so we can look into this further. This post is from almost 3 years ago so some things may have changed.
Best regards,
Jordan ShannonJanuary 23, 2021 at 4:52 am #1274890Hi,
I used the code added by Vinay and it eliminated the featured everywhere.
How can I remove the featured only at the top page on each single post but keeping them for example in widgets?January 23, 2021 at 5:05 am #1274893I write down more details
January 23, 2021 at 6:16 am #1274900Hey Daniele,
Please provide a link to the site/page in question so we can look into this issue further.
Best regards,
Jordan ShannonJanuary 23, 2021 at 7:29 am #1274924Here I am, sorry the mess.
So, reading from other discussions and suggestions, I removed the small featured image at the top with this Quick CSS:.blog-meta .small-preview { display: none; }
Then I change the arrows like that
.avia-post-nav .entry-info-wrap { width: 240px; }
But it seems to me that this second command override the blog layout setting about share links and related entries
Look at this
When instead my setting are:
only FB, Tw, email and Waps share links
and show thumbnails by default as related entries
But I re enter the editor, all setting are auto changed themselves?!?!
(Thumbnails by tooltip and all share links on)
very strangeJanuary 30, 2021 at 8:30 pm #1276540Hi,
@Daniele, sorry for the very late reply, I’m not sure why your share links and related entries changed, but the css above doesn’t target either of those items. I also took a look at your page in your screenshot and tested the css to confirm that neither element was affected by it.
I looked through a few of your posts and this error doesn’t seem to appear further and your featured image seems to be hidden, as you wished for. Did you have any further questions about the featured image?Best regards,
MikeFebruary 8, 2021 at 5:34 am #1278527Yep you’re right, now everything seems to be fine.
A couple of more question on the blog pages:
https://www.phoenixdivers-kohlanta.com/news/
1) how to show with this layout (that I Iike) a small featured image next to the excerpt?
2) how to remove “by phoenix Diver”, in other word how to remove the author when the author is the admin?Thanks
February 8, 2021 at 1:09 pm #1278638Hi,
#1: we do have this filter to set the “single-small” layout:add_filter('avf_blog_style','avia_change_category_blog_layout', 10, 2); function avia_change_category_blog_layout($layout, $context){ if($context == 'archive') $layout = 'single-small'; return $layout; }
but before trying this please note that the different blog layouts display this differently, ie: business, elegant, & modern business:
also try the page with a sidebar, I believe there is one layout that only shows with a sidebar, it was either the small image above the title or beside it, I don’t remember right now.
so first try these settings as the image may show just by changing this, otherwise try the filter and then test these again.
If this doesn’t help, please include an admin login in the private content area so I can try some different settings and filters.
#2: to remove the author please try this css:.blog .text-sep.text-sep-cat,.blog .blog-author.minor-meta { display: none; }
to remove only the “phoenix Diver” author, if there was multiple authors, first add this code to the end of your functions.php file in Appearance > Editor:
function custom_admin_author_script() { ?> <script> (function($){ $('.blog .post-entry').each(function() { $(this).find('.author > span > a').each(function(){ $('[href*="phoenix-divers"]').parentsUntil( ".entry-content-header" ).addClass('admin'); }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'custom_admin_author_script');
then add this css:
.blog .post-meta-infos.admin .text-sep.text-sep-cat, .blog .blog-author.minor-meta.admin { display: none; }
this removes the author and the backslash before it.
Best regards,
MikeFebruary 10, 2021 at 4:11 am #1279292thanks Mike
My set up are
-default business
-list layout – excerpt
since are the only ones I like.If I put your filter it will be the same as setting
single author-small preview picI dont understand what you mean by side bar, by the way I put temp login in private so you may have a look.
I havent tried your css to remove the author yet.
February 13, 2021 at 1:02 pm #1280249Hi,
Sorry for the very late reply and thanks for the login, I tested the different Enfold settings on my localhost and found that to have the small featured image next to the excerpt, like this:
you need to have the sidebar enabled on the blog page at: Enfold Theme Options > Sidebar Settings > Page Sidebar navigation > Sidebar on Blog Page
The full layout looks like this:
I enabled the sidebar on your site to enable this layout, and I had to disable this css in your Quick CSS to show the featured image:.blog-meta .small-preview { display: none; }
While this works, your posts looked different so I put the settings back. Please try this yourself.
Best regards,
MikeFebruary 19, 2021 at 8:05 pm #1282318Thanks Mike.
My wrong I haven’t explained it well, my wish is to show a small featured on the main blog page, not on the single post.
Like this, imagine small featured instead of my black circles.
Or if your images are the main blog page, what you wrote didnt work on mine. It just reset the small image on the top of the text block in each post (what I really dislike)Cheers
February 21, 2021 at 2:06 pm #1282601Hi,
Thanks for the feedback, I do understand that we are talking about your blog page /news/
Currently, your blog layout setting is for List Layout – Excerpt (Title, meta information and excerpt only), you would want to choose Single Author, small preview Pic (no author picture is displayed, feature image is small).
and you need to change this css to show the image on the blog page, but because you added it to remove the image on single posts I modified it to only work on single posts, from:.blog-meta .small-preview { display: none; }
to:
.single-post .blog-meta .small-preview { display: none; }
So now from screenshot one below, you can see the layout I believe you were looking for on your blog page /news/
The issue I now see is that the image in the blog post is showing in the excerpt, perhaps you will like this, but since your previous blog layout didn’t show images or videos in the excerpt, I’m thinking that you don’t want to show these. So the first option would be to edit each post and add the -more- tag above the images so they don’t show, or we could use this css to hide the excerpt images/videos only on the blog page.#top.blog .post-entry.single-small .entry-content img, #top.blog .post-entry.single-small .entry-content .avia-iframe-wrap{ display: none !important; }
Now you will see from the second screenshot the blog page is much closer, but it is still quite different from before because the layout in the theme options is different, the classes and css is different, it’s not one-for-one between the layouts.
I typically don’t leave changes like this in place on live sites, but I will leave it like this today because I think it would be easier for you to see the result.
Best regards,
MikeFebruary 22, 2021 at 10:46 pm #1282920Thanks Mike,
but I dont see any screenshots in your reply.
By the way I pretty much like everything as resulted now, the only thing is that I’d like to see on the main blog page the “read more”, with shortest text, not the whole text.
How to do that?February 25, 2021 at 1:35 pm #1283655Hi,
Sorry for the late reply, I didn’t notice that this is not your thread, that is why you can not see the Private Content area and the screenshots.
Anyways, you said you like the result now, but you would like to have the read more button like it was in the “list layout”, unfortunately, the “Single Author, small preview Pic” layout doesn’t have a read more button, so for a workaround I added the “read more” to one of your posts:
Then I added this css to your Quick CSS:#top.blog .entry-content .more-link { text-align: right; position: relative; margin-top: 40px; } #top.blog .entry-content .more-link { display: inline-block; border-width: 1px; border-style: solid; border-radius: 100px; padding: 0 20px; text-transform: uppercase; font-size: 0.8em; font-weight: bold; position: relative; z-index: 2; background-color: #ffffff; color: inherit; line-height: 2.1em; font-size: 0.75em; }
Now for the one post on your Blog the read more button is showing like on the “List Layout”
Please try adding the “read more” to the other posts, to show less of the excerpt try adding the “read more” above the post content.
The page is [your-domain]/news/Best regards,
MikeFebruary 25, 2021 at 10:34 pm #1283758February 26, 2021 at 12:35 pm #1283831Hi,
We will check the other topic. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Remove featured image from blog pages’ is closed to new replies.