bschmidt
asked 10 years ago

I have an issue with the gallery post type: Is it possible to show the image title an description in the post gallery? It works on frontpage but doesn’t show on the gallery wihtin the post.

2 Answers
DominicStaff
answered 10 years ago

To display images title and description in the gallery post, you log in to Dashboard > Posts > Edit Post Gallery, then click Edit Gallery link > Select the image you want to show the title & description. Take a look at the Gallery Settings section on the right hand side, you can add and edit the title as well as description here.
See the screenshot:

bschmidt
replied 10 years ago

Hi Dominic,
thank you for your fast answer. Sorry, but that’s not what I meant. The images in the gallery allready have titles and descriptions and it works fine on frontpage / social wall. But with in the gallery post itself no titles are shown by default.
Please take look at your demo: http://demo.designwall.com/dw-fixel/?p=189

My question was: Is there a way to show titles and description in the post like on the frontpage?

Kido D
answered 10 years ago

Hi bschmidt,
To resolve this issue, you can open up the functions.php file in themes/dw-fixel folder, find the code below (around line 310):

$output .= "'>";
$output .= "<img src='".$full_url[0]."' />";
$output .= "</div>";

… and change it into this:

$image = get_post( $img_id );
$output .= "'>";
$output .= "<img src='".$full_url[0]."' />";
$output .= "<div class=\"carousel-caption\">
<h4>".$image->post_title."</h4>
<p>".esc_html( $image->post_excerpt )."</p>
</div>";
$output .= "</div>";

Hope this helps!

bschmidt
replied 10 years ago

Hi Kido D,
thank you so much – that works fine!

Powered by DW Question & Answer Pro