• I’m working on a new windows software program (kinda like Windows Live Writer), & I have a question about a snippet of html that WordPress generates while I’m writing a blog post, here is my current process.

    1) Upload an image thru the wordpress Admin control panel, that gives me html code that looks like this.

    <img src="http://myblog.com/imagefolder/2009/09/myimage1.gif" alt="myimage1" title="myimage1" width="472" height="83" class="aligncenter size-full wp-image-337" />

    Here is the html code that I’m not sure about:
    wp-image-337

    What is this code for, & why is it being generated by wordpress, better yet can I delete this code (manually)?

    I’ve looked at my last few blog post that all contain images, the auto generated wordpress html (wp-image-337) looks like it is adding random numbers to the end of the code (example: 337).

    I have deleted the code from my last blog post, & the image still shows up in my blog. I’ve searched thru my cpanel for any type of filename similar to “wp-image”, & get nothing.

    Bottom line is I really need to be able to post to my blog without this html code, my fear is, will I ever break the image code down the road. I don’t want to post a bunch of new blog post/images then find out I screwed up each new blog post.

    Thanks… 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • Wp-image-337 is an automatically generated class name for CSS purposes. It allows you to target that image specifically within your posts and style it using CSS.

    When you upload an image, WordPress automatically assigns a bunch of classes depending on your image settings. The number at the end will simply be a unique id generated by WP when you first uploaded the image, so that if you ever wanted to edit the CSS, you could use

    .wp-image-337 {border: 1px solid #000; }

    and only that image would have a black border, none of the others.

    If you haven’t added any specific CSS styling within your stylesheet, then it’s basically benign, nothing more than a reference, and will have no effect on the display of the image (unless you add some CSS).

    Why do you want to get rid of it?

    Thread Starter 2009switcher

    (@2009switcher)

    SimonFairbairn,

    Thank you for your help.

    The reason I want to get rid of that wordpress code snippet is, I’m working on a windows program that does this:

    1) I will ftp +/-3000 images to my web host cpanel (manually), which is a few simple clicks at most.

    2) All of the images that get uploaded in step 1, will be in a folder on my local PC, I wrote a program to parse the entire folder for image names (image1.gif, image2.gif, etc…)

    3) After the image names get parsed the program will then write out the HTML for each individual blog post, & save a .txt, so you can see, at 3000 blog post, it will save me a lot of work.

    All of my images will be in the same folder online, with the same basic url http://myblog.com/imagefolder/2009/09/ my program will apppend the image name to the end of each url, to look like this http://myblog.com/imagefolder/2009/09/myimage1.gif

    Since I don’t need that wordpress code snippet wp-image-337 I won’t need to worry about the numbers that get generated (337, etc…).

    Can you tell me how wordpress stores each blog post (text file, database, etc…), & where I can find the folder in my wordpress install/cpanel?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can I Delete this WordPress Html Code?’ is closed to new replies.