 
	
		
		
		
		
			
- 
		AuthorPosts
- 
		
			
				
August 11, 2018 at 4:06 pm #996298Hi, How can I display the copyright information on each photo within a Enfold Gallery? Kind regards, 
 Roger – EZ WebdesignAugust 12, 2018 at 8:39 am #996417Hey Roger, The gallery element does not display the copyright information by default. However you could i.e. add the copyright information to the caption/popup tooltip by replacing line 320 in enfold\config-templatebuilder\avia-shortcodes\gallery\gallery.php $caption = trim($attachment->post_excerpt) ? wptexturize($attachment->post_excerpt) : "";with $caption = trim($attachment->post_excerpt) ? wptexturize($attachment->post_excerpt) : ""; $copyright_text = get_post_meta($attachment_id, '_avia_attachment_copyright', true ); if($copyright_text) $caption .= ' ' . $copyright_text;Best regards, 
 DudeAugust 12, 2018 at 11:51 am #996433Hi Dude, Thanks for your answer. I understand your code change, but in that case it’s easier then when I simply put the copyright information in the Title or Caption fields. Best regards, 
 RogerAugust 12, 2018 at 3:07 pm #996445Hi! Yes, it’s only useful if you already use the copyright fields… Regards, 
 PeterDecember 14, 2019 at 2:32 pm #1165865Hi Dude I’ve inserted the code referenced above but the copyright is still not showing. Please take a look. See https://beautifullaos.org/northern-provinces/725-2/ for the horizontal gallery. Thanks 
 JanineDecember 17, 2019 at 2:54 am #1166636Hi, 
 @jwencke: For the horizontal gallery, you have to modify the \enfold\config-templatebuilder\avia-shortcodes\gallery_horizontal\gallery_horizontal.php file, look for this code around line 512:$output .= "width='{$img[1]}' height='{$img[2]}' src='{$img[0]}' title='" . esc_attr( $title ) . "' alt='" . esc_attr( $alt ) . "' />";Below, add this code: $copyright_text = get_post_meta($attachment->ID, '_avia_attachment_copyright', true ); if($copyright_text) $output.= '<span class="copyright">' . $copyright_text . '</span>';You may need to add a few css code to adjust the style of the copyright text. Best regards, 
 IsmaelDecember 18, 2019 at 9:25 am #1167176Thanks Ismael! December 19, 2019 at 10:15 pm #1167963Hi jwencke, Glad we could help :) If you need further assistance please let us know. Best regards, 
 VictoriaJanuary 24, 2021 at 7:45 pm #1275123This is all very helpful. How do I add the copyright info into the avia content slider? January 26, 2021 at 8:04 am #1275410Hi, 
 @connect4consulting: You will have to do the modifications in the \enfold\config-templatebuilder\avia-shortcodes\contentslider\contentslider.php around line 828.$output .= ! empty( $value['content'] ) ? " <div class='slide-entry-excerpt entry-content' $markup>" . ShortcodeHelper::avia_apply_autop( ShortcodeHelper::avia_remove_autop( $value['content'] ) ) . '</div> ' : '';The line above outputs the slide excerpt or content. Best regards, 
 IsmaelMay 2, 2022 at 12:17 am #1350135Hi where should i put the code if i want to display image title, copyright and size below each photo in masonry Gallery? May 2, 2022 at 10:41 am #1350163Hi, The modification described here is for the content slider and the default gallery elements. For the masonry gallery, you will have to modify the enfold/config-templatebuilder/avia-shortcode-helpers/class-avia-masonry.php file. Look for this code around line 680. /** * Allows to run shortcodes * * @since 4.8.3 * @param string $content * @param array $entry * @param array $this->atts * @return string */ $content = apply_filters( 'avf_masonry_entry_content', $content, $entry, $this->config );Below add this code. $copyright_text = get_post_meta( $thumb_ID, '_avia_attachment_copyright', true ); $content .= " <div class='av-masonry-image-info'>"; $content .= "<span class='av-masonry-image-width'>Width: " . $attachment[1] . "</span>"; $content .= "<span class='av-masonry-image-height'>Height: " . $attachment[2] . "</span>"; $content .= $copyright_text; $content .= "</div> ";This should render the copyright, image size and content inside the masonry content container. Best regards, 
 IsmaelMay 4, 2022 at 10:28 am #1350440it works perfect. Thank you. Best support Team ever… May 5, 2022 at 11:54 pm #1350691Hi, 
 Glad Ismael could help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards, 
 Mike
- 
		AuthorPosts
- The topic ‘How to use the image copyright info within a Enfold Gallery’ is closed to new replies.
