The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
9 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
0answers
10 views

only first caption showing for attachment in Wordpress

ok I'm using the below code to generate caption for my attachments. The problem is if I have multiple images in a single page, the caption for first image shows for all the images. like if I have ...
0
votes
1answer
41 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 ...
0
votes
1answer
43 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
0answers
29 views

Custom caption/image shortcode disappears after switching between text-editor and visual-editor

I've written an custom shortcode for images. I use the filter image_send_to_editor to modify the inserted html. My code (mostly copied from the core) looks like this public function send_to_editor( ...
0
votes
1answer
105 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 ...
0
votes
1answer
68 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
125 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
120 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. ...
0
votes
1answer
163 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'] = ""; ...
0
votes
2answers
93 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 ...
0
votes
0answers
47 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 ...
0
votes
0answers
55 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
61 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 ...
0
votes
1answer
99 views

Automatically add image caption with values from a post parent field?

i have a custom dropdown field on post and i would to get the value from that custom field and insert it on each image caption field uploaded to the current post. I have been looking for a way to do ...
0
votes
0answers
119 views

SQL query to remove first image in all posts

I've built a site up over a few years (3,500+ posts) where I've inserted images using the traditional method into the post content itself. I'm now moving to a different theme, and have made the first ...
0
votes
1answer
734 views

PHP code to call image Caption, Alternative Text, and Decription?

Is there a Wordpress PHP code to call an image Caption, Alternative Text, and Decription? I have several images with Titles, captions, alt text and Description fields filled and would like to display ...
0
votes
1answer
330 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 ...
1
vote
1answer
90 views

Can't insert caption into image

You can see live example here. When I add a caption into the image, it doesn't show at all! I've added the caption to the image as you can see in the next picture but it doesn't show as you see ...
1
vote
1answer
182 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
0answers
103 views

Add image caption to frescojs

I want to add the image caption to the frescojs popup. The following code is in the functions.php: add_filter( 'wp_get_attachment_link', 'sant_prettyadd', 10, 6); function sant_prettyadd ...
3
votes
1answer
43 views

Alter media caption/description conflict in Wordpress?

When uploading an image, Wordpress reads the description meta data from the jpg via wp_read_image_metadata and inserts it into the post_content field when adding the attachment via media_handle_upload ...
0
votes
2answers
187 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
50 views

How to change images size after theme modification?

The images in the previous theme were using a height and width listed in the source html. The new theme will resize the images using percentages, so I need to remove all the height and width in the ...
0
votes
1answer
158 views

Dynamically adding Captions to images

I have a site where the author has included Amazon Affiliate links. They've done this by adding the URL to product images. I'm wondering if there's a way to add a function that will automatically add ...
2
votes
1answer
3k views

Get Image Description

I'm trying to make a post split in 2 columns. The first and left one is going to be any image inside the post, and the second and right one will be the_content() (excluding the images). So as of now ...
0
votes
1answer
565 views

How to add a credit line to a photo caption

I'm trying to find a way to automatically add a photographer credit line to user-inserted photos. I've added custom fields to the media uploader for 'Photographer Name' and 'Photographer URL' but I ...
0
votes
1answer
326 views

Custom caption output for custom image size

I've done a lot of searching and have found out how to customize the img_caption_shortcode oputput. What I can't seem to figure out how to do: Add a specific class to the caption's output if a ...
1
vote
2answers
306 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
306 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 ...
0
votes
1answer
48 views

Move caption in on attachment page

I am looking for a way to edit the way Wordpress’ native gallery displays images when clicked on. Specifically, I need to move the title below the image. A more detailed explanation: I setup a ...
0
votes
1answer
439 views

Random home page background images with caption text

all. I am developing a Wordpress theme and I need to have a random background image display on the home page with specific text for each image. I have installed the Background Manager plugin ...
3
votes
2answers
2k views

make Wordpress image captions responsive

This webpage contains images inserted by Wordpress. The code used to insert the first image is: [caption id="attachment_887" align="alignnone" width="604"] <a ...
4
votes
1answer
58 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 ...
1
vote
0answers
99 views

Way to add captions to gallery images by code

I am creating posts by using wp_insert_post function. It works fine as I provide values in array required. Sometimes it is required to create a post having gallery. Without any problem, it also works ...
1
vote
1answer
570 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 ...
1
vote
1answer
247 views

How do themes render caption texts in extended markup (e.g. “wp-caption” paragraphs)

I've created my own theme based on a very lean template. My theme is not parsing the [caption]...[/caption] markup to the correct html. It's just showing the text without any markup around it. Here ...
2
votes
1answer
1k views

Add extra class to wp-caption?

How do you add a new class to the HTML generated when an image with captions is added? For example, from this: <div id="attachment_xyz" class="wp-caption alignleft"... to this: <div ...
1
vote
3answers
764 views

Caption shortcodes not including caption as attribute

I recently installed the bonpress theme and am having trouble with the captions showing correctly. The more I try to understand how captions are supposed to work in Wordpress, the more I suspect ...
0
votes
1answer
1k views

How to limit post content and remove image caption from it

I am using this function to limit the content in my themes. But the problem is whenever I call the function, it also displays the image caption. I want to remove the image caption when calling ...
0
votes
3answers
293 views

How to edit caption for images and exclude it from excerption query?

I have 2 questions for caption for images: - how to edti them with bold, italics and so on? I do it, but it doesn't work. - if the image is first, how to exclude caption from excerpt in query ...
0
votes
1answer
124 views

Wrap a post image with a div if it doesn't have a caption

I've tried the below code to wrap a post image with a div and it works. The problem I'm having is if the image has a caption. It screws up the the code that is generated when a caption is set for the ...
-1
votes
2answers
516 views

Seeking recommendations on Gallery plugins , specifically captioning thumbnails [closed]

I am looking for a gallery plugin that will display thumbnails on a page with captions beneath them, and still allow them to click through to fullsize images, preferably with a slideshow mode allowed. ...
2
votes
1answer
285 views

Is there a way to define a default caption to all uploaded images

As the title of this answer say, I want to define a default caption to all uploaded images in my WordPress... Is there a way to do something like this?
0
votes
2answers
719 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 ...
0
votes
1answer
235 views

Display a post attachment depending on the caption

I would like to display automatically a post attachment (PDF) depending on the language of my blog (french and english). When the post is displaying in french version, I would like display the french ...
2
votes
1answer
152 views

Include captions

I'm using the Meta Box plugin, everything works fine. I'm using it to create gallery function on some custom post type, and I'm able to display the uploaded images using this code: global $wpdb; ...
0
votes
2answers
1k views

How to add line breaks inside Gallery Captions

I am using this excellent piece of code to insert a line break in single image captions by way of inserting a pipe character... Now I would like your help to try to incorporate this into the gallery ...
1
vote
0answers
430 views

Image caption with apostrophe breaks the text with qTranslate [closed]

I created my own theme and I use on two different websites, along with a very few plugins (among them, qTranslate!). I noticed that recently (I don't think it was happening before) that all my image ...
1
vote
3answers
2k views

HTML tags in Wordpress image caption

I'm developing a client website with Wordpress (3.3) but have found that the image caption feature strips out any HTML tags. The resulting caption is plain text which makes proper image crediting ...