Thanks Beda.
And I have increased the gallery with additonal textfields as captions. The above solution is based on repeatable image fields. The following solution is based on a repeatable group field. Both solutions make use of the "WF Magnific Lightbox"
Workaround:
The Parent is the custom post type "News". I want to write several news and want to have the option to insert a separated gallery (not only WordPress Galleries) with caption-text and popup (Lightbox) effect.
1.) Build a new CUSTOM POST TYPE "News Caption". Retain all options default, save. Edit again and choose "NEWS" as "PARENT POST TYPE". Save.
2.) Build a new "POST FIELD GROUP" -> "CAPTIONS". Add 2 news fields: "CAPTIONIMAGE" (image field) and "CAPTIONTEXT" (single line field). Enter Names and slugs and retain the default options. Save. Edit again and choose "POST TYPE(S): NEWS CAPTION" as "Where to include these Fields".
See attached Screenshot 1: 01_post_field_group_for_post_type_news-captions.png
3.) Now add a new "VIEW", choose "Display all results". Next choose "NEWS CAPTION" under "Content Selection". In the Loop Output field insert the code. For the code see ->
attached Screenshot 2: 02_views_for_caption.png
4.) Now write a new News. Below the textfield you can insert "captionimage" and "captiontext".
See attached Screenshot 3: 03_edit_cpt_news_insert_images_and_captions.png
5.) Look at frontend. You'll see the images and the text. With a bit love of CSS it looks like so:
See attached Screenshot 4: 04_gallery_with_textfield_as_caption.png
6.) To receive a caption in the popup image you must input text in the alt (alternative text) field of the image in the WordPress Media library. And the next screenshot shows the popup (lightbox) with alt-text as caption.
See attached Screenshot 5: 05_popup_image_with_caption.png
@Beda:
please could you take a look to the mentioned code, if the double/single apostrophes are okay (only) in Views? (Oh I detected one mistake in the code= it should be 'crop' and not "crop")
I post the (hopefully) correkt code below:
[wpv-layout-start]
[wpv-items-found]
<div class="newsimggallery">
<div class="gallery">
<!-- wpv-loop-start -->
<wpv-loop>
<a href="[types field='captionimage' raw='true' link='false'][/types]">
[types field='captionimage' size='thumbnail' align='left' resize='crop' title='Zum Vergrößern bitte klicken' alt='[wpv-post-title]'][/types]
<span>[types field='captiontext' output='raw'][/types]
</span>
</a>
</wpv-loop>
<!-- wpv-loop-end -->
</div>
</div>
[/wpv-items-found]
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"]Keinen Eintrag gefunden[/wpml-string]</strong>
[/wpv-no-items-found]
[wpv-layout-end]
After your reply I wil close the thread.