Working with [caption id=”attachment_###”

From: WordPress › Support » Working with caption id=”attachment_###”

I am using MarsEdit (OSX stand-alone blogging software) to publish to my WP blog and have everything working with the exception of one issue I am just confused about.

I use captions for all embedded images in my posts and love the feature. The first part of the caption code reads:

caption id="attachment_###" where “###” is a seemingly random number. How is that number generated (where does it come from)? Is it necessary for posting new photos with captions? While MarsEdit lets me template how each image is inserted, I don’t know what number to put in this part of the code.

I found this documentation: WordPress › Support » Working with caption id=”attachment_###”

Image Settings – Titles, Descriptions, Captions, etc.

You can add captions to your images by using the “Image Caption” field in the “Add an Image” or the “Edit Image” window.

WordPress Heart Button
When you add a caption to an image, caption shortcode is inserted into the source code. The caption is also used as the alternate text for the image by default. Here is the source code for the image above right after inserting it.

caption id="attachment_945" align="aligncenter" width="161" caption="WordPress Heart Button"”WordPress[/caption]

Unfortunately, this doesn’t tell me why the number “945” is used in both places above. Any takers please?

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>