Viewing 30 posts - 1 through 30 (of 30 total)
  • Author
    Posts
  • #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!

    #859834

    Hey newpappa,

    So you don’t want featured images on any of the blog pages?

    Best regards,
    Jordan Shannon

    #859839

    Correct. 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.

    #859851

    Any ideas?

    #859858

    Hi,

    Add the following to quick css:

    .archive img.size-full, .wp-caption-text{
    display:none!important;
    }

    Best regards,
    Jordan Shannon

    #859872

    Hi 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.

    #860349

    Hi,

    Would you like to not display them at all or display only on single posts?

    Best regards,
    Yigit

    #860359

    Hi Yigit,

    Thanks for the response. We’d like to not display them anywhere.

    Best regards

    #860778

    Hi,

    Please provide admin info so we can login and access the functions.php file.

    Best regards,
    Jordan Shannon

    #862191
    This reply has been marked as private.
    #862264

    Hi,

    I would need to see the page within the environment it will be used to prevent errors being thrown.

    Best regards,
    Jordan Shannon

    #862265

    Hi,

    Could FTP info be shared?

    Best regards,
    Jordan Shannon

    #867192

    Hi!

    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,
    Vinay

    #1186178

    This crashes my site???

    #1186842

    Hey 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 Shannon

    #1274890

    Hi,
    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?

    #1274893

    I write down more details

    #1274900

    Hey Daniele,

    Please provide a link to the site/page in question so we can look into this issue further.

    Best regards,
    Jordan Shannon

    #1274924

    Here 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
    Screenshot-2021-01-23-at-06-26-09

    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 strange

    #1276540

    Hi,
    @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,
    Mike

    #1278527

    Yep 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

    #1278638

    Hi,
    #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:
    2021-02-08_055722.jpg
    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,
    Mike

    #1279292

    thanks 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 pic

    I 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.

    #1280249

    Hi,
    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:
    2021-02-13_052353.jpg
    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:
    2021-02-13_054017.jpg
    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,
    Mike

    #1282318

    Thanks 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.
    Screenshot-2021-02-19-at-19-02-22
    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

    #1282601

    Hi,
    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,
    Mike

    #1282920

    Thanks 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?

    #1283655

    Hi,
    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:
    2021-02-25_062635.jpg
    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”
    2021-02-25_063053.jpg
    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,
    Mike

    #1283758

    Perfect Mike!
    I am totally satisfied now! ;-)

    One thing, did you notice this vertical stretch out layout as well?
    Screenshot-2021-02-15-at-18-57-14

    I already open a topic about anyway,
    Cheers

    #1283831

    Hi,

    We will check the other topic. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 30 posts - 1 through 30 (of 30 total)

The topic ‘Remove featured image from blog pages’ is closed to new replies.