In WordPress images are special types of posts. The caption of an image is stored as the excerpt of that post.

learn more… | top users | synonyms

0
votes
0answers
5 views

Injecting bbcode back from popup to post Visual editor

I'm trying to make a Wordpress plugin that can generate media bbcode for wordpress. my popup2wp.php , this is adding a button to edit post media toolbar, that will open a popup window. <?php /* ...
1
vote
1answer
499 views

Remove inline width from figure

I add an image with caption to my page and need to increase <figure> width. But wordpress is adding an inline width. [caption id="attachment_44" align="alignnone" width="216"]<a href="image ...
0
votes
1answer
25 views

Custom field as featured image caption

The problem is: My featured image caption is not being shown since it is (still) stored in a custom field (called (wpcf-bildunterschrift). I can easily access the customfield, but not the field that ...
2
votes
4answers
747 views

Caption in Page adding unwanted 10px to width

I'm trying to create an image with a caption in a Page I'm working with. In the image options, I have it aligned right, with an image width of 220. Without the caption I have no problems, however with ...
0
votes
2answers
626 views

Removing height and width from images with a caption

I am using WordPress with Twitter Bootstrap 3 and have an issue when it comes to images with captions. Images with captions are given a height and width attribute which stops them from being ...
0
votes
1answer
24 views

Gallery IDS and Captions: hide/show on a per ID basis

I am aware of hiding captions in a gallery via css on figcaption, like .wp-caption-text/.gallery-caption for example. What I am looking for is a way to have custom control of hiding captions on ...
8
votes
1answer
87 views

Multi user site and image captions

On multi user sites when authors select images from the media library they can choose images that other authors have uploaded. The problem is that they can edit the caption and it changes it for both ...
0
votes
1answer
57 views

How to add a caption to an image attachment in a file list?

I've tried various things and can't get the captions to show up in my gallery. I'm using CMB2's file list to output image attachments. I hope this question is pertinent enough to this forum as I think ...
0
votes
0answers
18 views

Basic HTML visual editor for image captions

So, Wordpress 3.4 and beyond now allows html within the Caption field of an image. However, there isn't the basic visual html editor attached to the field. Is there a way to turn on the basic html ...
0
votes
1answer
35 views

Add caption to thumbnails in content

Still trying to get the answer, i don't really know wordpress core (but i'm actually pretty good in PHP), I can't find how to add caption to my images in posts. I know we can use get_posts to any ...
0
votes
1answer
89 views

Get post embedded image caption

I am trying to get the caption of post embedded images to then use on a lightbox. This is my code: function my_theme_prefix_content_gallery( $content ) { global $post; $args = array( ...
0
votes
0answers
68 views

image_send_to_editor filter

I'm trying to achieve the code below, when using the normal default editor in wordpress. <div class="col-md-6"> <figure> <img class="alignright" src="/wp-content/themes/tna-...
0
votes
1answer
59 views

caption shortcode using image alt as caption

The img alt attribute is dsplaying as caption and laos the caption is displaying, I do not want to display the img alt attribute as caption , how can I remove it. my code <p> [caption id=...
0
votes
0answers
88 views

Image caption in Magnific Popup for images embedded in a post

I am trying to implement functionality to open my post images with Magnific Popup. I have the following script which works fine: add_filter('the_content', 'my_addlightboxrel'); function ...
0
votes
0answers
23 views

Get the post body images captions in a lightbox

I am trying to implement functionality to open my post body images with Magnific Popup. I have the following script which works fine: add_filter('the_content', 'my_addlightboxrel'); function ...
-1
votes
1answer
24 views

Trouble with Captioned Responsive Images

I'm trying to make a nice looking captioned image that is centered, responsive, and has a padded border around it. Here is my test page with the things I've tried: http://www.acneauthority.org/test1/...
3
votes
1answer
177 views

Drag images with caption in WP editor

Whenever I insert an image without a caption in the post, the editor makes it an object that I can select and move around / scale. Whenever I insert an image with a caption, it inserts fine. I can ...
1
vote
1answer
70 views

Showing image description along with embedded links below post images

I have images in my Wordpress posts with the following field setup: Caption: This field contains the actual image caption to be displayed below the image. Description: This field contains photo ...
-1
votes
1answer
341 views

How do I change the woocommerce product gallery to show all thumbnails instead of three at a time in a carousel?

I am building a site for a client and I can't seem to figure out how to remove the product gallery carousel setting. For the final result, I want to be able to see all the thumbnails at once and not ...
0
votes
1answer
6 views

slider stripping out caption/excerpt line breaks

I ran into an issue where the slider I was using (Wonderplugin) was stripping out paragraph and other formatting tags on captions/descriptions, though they were working on the actual images in Posts.
0
votes
1answer
477 views

How to add 'data-caption' inside an anchor tag

bellow is custom gallery code. function custom_gallery_shortcode( $attr = array(), $content = '' ) { $attr['itemtag'] = "li"; $attr['icontag'] = ""; $attr['...
3
votes
1answer
113 views

Featured image shortcode

Each post currently requires the featured image to be duplicated within the post several times. Is there any way in which I could dynamically call the featured image back into the post rather than ...
0
votes
1answer
75 views

Update caption for metabox gallery images

Just wondering how to make the caption on my metabox gallery images updatable. I have the caption on a textarea so it can be easily updated. I can change the contents of this textarea, cant seem to be ...
0
votes
1answer
85 views

How to show post format gallery metabox image caption in the post front end

After getting my images through a metabox for a gallery post format I have the following code to show them on the post front end: <?php if ( !empty( $images ) ) { foreach ( $images as ...
0
votes
1answer
139 views

Get image captions for images on gallery post format metabox

I have a post format gallery. I have created a metabox to add my images: function mytheme_show_post_gallery_metabox( $post ) { wp_nonce_field( 'mytheme_post_gallery_metabox', '...
1
vote
1answer
32 views

Replace image caption with its title and description

Is it possible to replace the caption text of an image with its title and description fields when inserting it in the editor? If so, how? Thanks in advance
0
votes
0answers
80 views

Insert image caption (metadata) in shortcode in functions.php

I've created a shortcode that displays a random image given that certain parameters are filled, like img url and number of images to random through. It looks like this: function randimg_shortcode( $...
2
votes
0answers
34 views

Text editor on WP caption

I'm trying to add the visual editor to image captions in wordpress. I'm somewhat able to but there are a few issues. Here is a screenshot of what I currently have: You can see "Visual" and "Text" ...
0
votes
0answers
91 views

Caption description in tinyMCE editor

I posted this on the hacks forum of Wordpress a week ago but it seems no one is able to help me there. I'm currently customizing the captions for a client, and I have two separate problems that I can'...
0
votes
1answer
150 views

Add caption functionality to custom WordPress theme

Hi I am working from a custom theme created by my predecessor and I am trying to add caption functionality to the theme but I am have some trouble with it. Presently if I insert a image into a post ...
0
votes
1answer
57 views

How to always add caption element to images - even if empty?

I want to add the caption ALWAYS to images, even if it is empty. This is my function to add the caption, but the caption element will not be generated when there is no content in it, how to add the ...
0
votes
0answers
35 views

Show Audio Caption

How to show captions of audio file in a playlist without using plugin? WP shows only title and artist. Is there a solution? Thanks
1
vote
1answer
719 views

Getting Featured Image Caption to Only Show if Populated

Good evening! I'm trying to hide the featured image caption from showing. Currently, it'll show build the div (but not populate it because it's empty). What I'd like to do, ideally, is only show the ...
2
votes
3answers
747 views

Nested Shortcode Inside [caption] Doesn't Process

Captions in wordpress do not support nested shortcodes at the moment (v3.6). So, If I do write [caption]<img src=""> I love my [city][/caption] Where city is suppose to be processed but it ...
0
votes
1answer
677 views

How to dynamically insert <a href> in the image caption?

So, below is the Wordpress default generated code for a gallery item: <div id='gallery-1' class='gallery galleryid-203 gallery-columns-3 gallery-size-thumbnail'> <dl class='gallery-item'...
0
votes
1answer
856 views

How to get the_post_thumbnail caption?

I want to show the caption of the post thumbnail, there's a couple of methods out there, but none of them displays the caption properly, the caption just float and not displayed under the image! I ...
0
votes
1answer
134 views

Automatically Add Caption Shortcode to Image with Caption Field Filled In

I am hoping to be able to have the [caption] shortcode automatically get inserted into the post content area when you add in an image that has the caption field filled in. I believe this is supposed ...
0
votes
0answers
150 views

How to convert image alt text/caption box type of media manager in Wordpress?

Firt of all sorry for my English. I want to convert caption box from textarea to textbox and i want to convert alt text box from textbox to textarea. Additionally i want to remove description box from ...
2
votes
0answers
256 views

How to have different captions for same image, for galleries?

Seems like I can't have the same image in different galleries with different captions. Is it possible to make that working in any way? Like if we could change the shortcut code that Wordpress is ...
0
votes
2answers
1k views

Remove wp-caption but still show the image

I have been using wp-caption for so long but for a template I am working on I want to delete this tag and only show the image, I used display:none; function but it does not show the image , any help ?...
1
vote
1answer
251 views

Forcing max-width for image captions

I've implemented a filter to my image captions based on this question I asked a few days ago. How can I slip into the caption the css style of max-width as well? I think it can be done with ...
0
votes
1answer
122 views

Wordpress Caption Formatting

I'm trying to create a custom wordpress theme. Everything has gone fine, except image formatting in post content. Image captions are not displaying properly in newly created theme. I have already ...
1
vote
1answer
867 views

echo image caption

I am attempting to echo out my image captions in a Bootstrap Carousel. I have managed to get my images to display but unable to display my captions. I have attempted to use wp_get_attachment_metadata ...
0
votes
1answer
213 views

Move captions under gallery images in twenty fourteen theme

The new twenty fourteen theme will only show captions on top of gallery thumbs. Is there something I can do in the functions (or copy from twenty ten) to make them visible all the time and show up ...
1
vote
1answer
460 views

XML-RPC: How to add media caption to uploaded image?

I need to migrate non-WP data from an SQL database to posts in WP, and thought that using XML-RPC in a closed environment before deploying was a smart solution. This is my first WP project, so I'm ...
1
vote
1answer
672 views

How do I remove featured images and captions from a wordpress RSS feed?

I'm trying to remove featured images and captions from my feed and struggling to do it. As another question has identified it is very difficult to format captions and so as a newsletter feed I want to ...
0
votes
0answers
360 views

Remove Captions from Custom Gallery function.php

I like to prevent captions from being outputted in my custom gallery function. I could easily just hide it using CSS but it doesn't feel right. The caption is being sent from media.php this line. ...
1
vote
2answers
488 views

How to check if there is image title, caption, description?

I use this code to display featured image title, caption (excerpt), description (content): echo get_post(get_post_thumbnail_id())->post_title; echo get_post(get_post_thumbnail_id())->...
0
votes
0answers
100 views

page displaying media caption shortcodes

I am developing my first wordpress theme. I encountered a problem in page section. I added a image in a page with add media button. When i viewed the page, it does display the image but also the ...
0
votes
1answer
128 views

WP Gallery showing captions twice

I am using standard WP gallery to display images. I have added caption to every image, image title was not changed so it is same like file name. When I open one image in gallery it shows caption text ...