how to hide featured image on single blog post

  • Posted in : Impose
  • trustychords
    Participant

    I want to hide the featured image on a single blog post, but keep them for the others. Can you help me with the CSS code?

    serkan
    Moderator

    Yes, I can help you with that! To hide the featured image on a specific blog post while keeping it visible on others, you can use custom CSS. Since each post has a unique post-id, you can target that specific post and hide the featured image using CSS.
    Go to your WordPress Dashboard.
    Navigate to Posts > All Posts.
    Find the post where you want to hide the featured image (in your case, “Differences in Household Food Insecurity from 2012-2013”).
    Hover over the post title and look at the URL in your browser’s status bar. You’ll see something like post=1234, where 1234 is the post ID.

    Once you have the post ID, you can add the following CSS to hide the featured image on that specific post:
    /* Hide featured image for a specific post */

    .postid-1975 .featured-image { display: none; }

    Go to your WordPress Dashboard.
    Navigate to Appearance > Customize.
    Look for the Additional CSS section (usually under “Additional Settings” or similar).
    Paste the CSS code into the CSS editor.
    Save and publish the changes.

    Visit the specific post and check if the featured image is hidden. It should now be hidden only on that post, while remaining visible on others.

    trustychords
    Participant

    This worked perfectly! Thanks so much.

    serkan
    Moderator

    Hi,

    Thank you so much for choosing our theme! We hope it’s been a great experience for you so far. If you have a moment, we’d be incredibly grateful if you could share your feedback on ThemeForest.

    Your review not only motivates our team but also helps us improve and create even better updates in the future. Plus, it helps other users make informed decisions!

    👉 Leave a Review on ThemeForest

    Thank you for your support—it means the world to us!

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

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register