Output Custom Field value to shortcode

Depending on the ngg_images shortcode, you maybe need to echo the do_shortcode function. You can try function lilap_gid($atts, $content = “”){ $gid = get_post_meta(get_the_ID(), ‘gallery_id’, TRUE); ob_start(); echo do_shortcode( ‘[ngg_images tag_ids=”‘. $gid .'”]’); $content = ob_get_clean(); return $content; } add_shortcode( ‘gallery_display’, ‘lilap_gid’ );

How to repeate custom field group with bulk image field

it need custom code to create repeatable fields but if you want ready-made solution than you may try this : https://github.com/WebDevStudios/CMB2 just include it in your theme/plugin and than check it’s example-functions.php file , it have example of repeatable fields 🙂 here is direct documentation link : http://cmb2.io/docs/field-types#-types-group it also support many other fields . … Read more

How to delete attachments associated with custom field type when post property changes? [closed]

You can use the save_post hook. add_action( ‘save_post’, ‘mytheme_my_post_just_updated’ ); function mytheme_my_post_just_updated($post_id){ $deal_type = get_field($post_id, ‘deal_type’); if($deal_type == ‘sold’){ $gallery = get_field($post_id, ‘gallery’);// This bit and the next few lines will depend on how you’ve set up the custom field. // Fast forward a few lines… foreach($images as $image){ // I’m assuming that $images is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)