Hide an image in a wordpress post


Hide a image in a wordpress post

This is a helpful reminder to myself more than anyone else really, as I keep forgetting the code for hiding an image in a wordpress post everytime I try to hide a blog post image in there for my Pinterest page.

Some images look just odd on your blog, but work on pinterest. So to hide them from your blog viewers you can:

  1. Upload the image as normal to your wordpress media gallery
  2. Insert it where you want in your post
  3. Go in to the text tab of your wordpress post and find where the code is for the image – it should look something like <img class=”alignnone size-medium wp-image-2396″ src=”https://somemadeupblogURL.com/imageexample” alt=”” width=”300″ height=”235″ />
  4. add this code before the start of the image code ( the one that starts <img class)

    <div style = “display:none;”>

 

5. add this code after the code for the image

         </div>

I’ve added the code in as text above so that you can copy and paste it if you need to!

 

 

You may also like

Blogtober | Relaxation

Blogtober | Quotes

Blogtober | Movies

3 Comments

  • MummytoDex
    August 23, 2017 at 7:11 pm

    This is so helpful! Bookmarking this because I always forget how to do it and end up googling it!!

    • iamcrabstix
      August 23, 2017 at 7:12 pm

      Same. I thought I’d give myself the traffic rather than someone else as I need it alot for work!

  • Hayley - Devon Mama
    August 24, 2017 at 9:53 am

    I didn’t even know you could do this!!

Leave a Reply