add_filter('frmpro_fields_replace_shortcodes', 'frm_make_shortcode', 10, 4); function frm_make_shortcode($replace_with, $tag, $atts, $field){ if(isset($atts['link_full'])){ $new_val = ''; foreach((array)$replace_with as $v){ if(is_numeric($v)){ $full = wp_get_attachment_image_src($v, 'full'); $thumb = wp_get_attachment_image_src($v); $new_val .= '<a href="'. $full[0] .'"><img src="' . $thumb[0] . '" /></a>'; } } return $new_val; } return $replace_with; }
i used this code at the view field [212 link_full=1] where 212 is the field id containing the attachments.
-------------------------------------------
do you have any recommendation?
the image of the attachment is linked to entry not to the attachment
thanks alot
Thank you Victor for you feedback, you have pointed the case clearly.
Excuse our basic knowledge in coding, we tried to wrap each link in div but it seems we did not code it well.
Can you support with that?
thanks
If you need a developer to write code for your project, I'm not the one who can do it for you. I don't have the bandwidth to take on any more projects at present. I suggest you look at the Formidable Masterminds Developers Directory to locate a resource: https://formidable-masterminds.com/developers-directory/
Please login or Register to submit your answer