Hello @anlino. Thanks for your reply and thank you a lot for your great themes.
Your answer didn’t solve my problem but permits to progress.
In fact my aim was to add the description data from an image (not the caption data), when you opened it from a gallery post made by wordpress editor, which link to attachment page.
I don’t want bother you on how I concluded this but if I erase image.php from Fukasawa theme, description data from image attachment page appears by defaut.
So I add the following code to a child image.php and it works :
<?php
if ( $post_format == 'video' && isset( $content_parts ) ) {
$content = $content_parts['extended'] ? $content_parts['extended'] : '';
$content = apply_filters( 'the_content', $content );
echo $content;
} else {
the_content();
}
if ( ! is_single() ) {
edit_post_link( __( 'Edit post', 'fukasawa' ), '<p>', '</p>' );
}
?>
I don’t know if I paste uncessary lines of code, but there is something inside this which missing inside Image.php to display description data.
-
This reply was modified 3 years, 7 months ago by wpsoup. Reason: page formatting