• Resolved Marika1001

    (@marika1001)


    Hello,

    Here is my website : http://deslivresetdesetoiles.com/.

    My featured images in post are all big (height) because they are book cover. I would like to make it disappear from the post, but to still be shown in the preview (on the articles page). Is it possible ? I’ve been trying to do this for a while but I can’t figure it out.

    I tried those modifications but none of them had the effect I wanted :

    .featured-media a {
    display: none;
    }
    .featured-media img {
    display: inline-block;
    }
    .featured-media iframe {
    display: inline-block;
    }

    ==> Image still in the post but not in the preview anymore (which is the opposite of what I want).

    .featured-media a {
    display: inline-block;
    }
    .featured-media img {
    display: none;
    }
    .featured-media iframe {
    display: inline-block;
    }

    ==> no image in post and no image in preview.

    I also tried this one, but it didn’t seem to have any effect :

    .featured-media a {
    display: inline-block;
    }
    .featured-media img {
    display: inline-block;
    }
    .featured-media iframe {
    display: none;
    }

    Can anyone help me please ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • heratik

    (@heratik)

    Hi,

    i am a total newbie but i have managed it somehow by changing some code in the “single.php” file.

    simply change line 123

    from

    <?php the_post_thumbnail('post-image'); ?> -->

    to

    <!-- <?php the_post_thumbnail('post-image'); ?> -->

    I hope this works for you… and bare with me if this is not a pro solution.

    you can see it live on my homepage: http://www.heratik.de

    Thread Starter Marika1001

    (@marika1001)

    Thank you for your answer, but it doesn’t seem to work for me (or maybe I am doing it wrong, I don’t know).

    Thread Starter Marika1001

    (@marika1001)

    Hello,

    A friend found a solution to my problem, so I post it here in case someone needs it :

    I deleted the featured media div from line 23 to line 37 and from line 121 to 135 in the single.php file.

    Hello, I’m worried that by modifying the single.php file you might get a reversion in behavior if you ever update the theme.

    I had the same problem as you, and I found that the following fix has worked so far… I am running a plugin that lets me apply custom CSS to my site, and in there I added the lines:

    .fleft .post .featured-media {
      display: none;
    }

    That seems to hide the image on the page itself (on all instances of single pages), but allows the image to feed through to the article listing.

    Hope this helps.

    –Tim Rohr

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Edit featured image display’ is closed to new replies.