Support » Plugin: Fotorama » Any way to use description instead of caption?

Viewing 1 replies (of 1 total)
  • The fotorama WordPress plugin uses the output of the gallery_shortcode() function which is the handler for the [gallery] shortcode. That function has a filter post_gallery which allows you to override the entire output. I think this about the only way to make any customisations of that sort as fotorama uses the output of that function, once each for the thumbnails and main images.

    You can copy the entire function from \wp-includes\media.php, rename it and hook it to that filter. Make sure you take out the following code in your copied function which is on line 783-786:

    // Allow plugins/themes to override the default gallery template.
    $output = apply_filters('post_gallery', '', $attr);
    if ( $output != '' )
    		return $output;

    I haven’t got time to write your solution however a quick look tells me that on line 879, the caption uses $attachment->post_excerpt. You could change this to whatever you like. That should do it.

Viewing 1 replies (of 1 total)
  • The topic ‘Any way to use description instead of caption?’ is closed to new replies.