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' );
Related Posts:
- Using a custom field inside a shortocde
- Running a Gallery Shortcode in a Custom Fields Widget
- explode array within shortcode
- Change behavior of “Insert into Post” based on attachment metadata
- Add new “Insert Into Post” button with another function
- Call a custom field in an audio shortcode?
- wp_editor in add_meta_boxes does not show gallery
- Custom field for default gallery
- Execute/Parse Shortcode in Native WordPress Custom Field Value Field
- nextgen gallery: how to get picture url by gallery id
- Audio player shortcode not showing up when using variable
- Create WordPress shortcode with php code inside
- Display WP-Types custom fields in post [closed]
- Should custom meta boxes be able to output shortcodes the same as WordPress’ native post editor?
- Shortcode To Display Post Custom Field Value Inside Excerpt
- modify wordpress caption shortcode
- How to create a shortcode to print specific values stored in a post meta array?
- Insert a custom field into a shortcode and use it in post(s)
- Is it possible to create a post from an NextGen Gallery image?
- Custom wysiwyg editor doesn’t execute shortcodes?
- Custom Field 101
- shortcode in a custom metabox
- Can data from a Custom Field data be used by a shortcode on a per page/post basis?
- Shortcode To Display Post Custom Field Value in Post Title, Post Content
- custom field (video/audio url) and embed functionality
- IF Custom field value equals ZERO
- Display MP3 as media using an URL from a custom field
- Enable a short code in the custom meta field
- do_shortcode close
- Plugin or shortcode for ISBN number?
- How to pass custom field value to shortcode?
- Replacing custom field with shortcode
- Shortcode for Custom Field of Media Attachment (to use with Featured Images)
- how can i show WordPress custom field data to my short code?
- Search fails when using the radio buttons
- Create Shortcode shows only posts with custom_field meta
- PHP and Shortcode Combination
- Stop truncation of shortcodes in custom text fields?
- Retrieving Advanced Custom Field within Shortcode Function [closed]
- Using ACF Custom Field value in a URL with do_shortcode() [closed]
- Custom field in a shortcode?
- Display meta data from a custom field within plugin Category Grid View Gallery
- Insert wp gallery shortcode into custom textarea
- Displaying shortcode content inside custom field without images
- Parse Shortcodes in Theme’s Custom Field?
- Insert shortcode before and after a list automatically
- Retrieving custom field as shortcode
- Custom fields doesnt work well with any postTAB plugin
- How to include custom field in shortcode (do_shortcode) in theme file
- Shortcode not picking up custom field
- Add a Jquery Datepicker to custom field in post edit
- How can I avoid re-inventing the Custom Fields wheel in my Plugin’s Metabox?
- Does wordpress have something like content-type?
- Order Posts by Closest Numeric Values
- How to get and edit custom fields if in Quick Edit
- Order posts by custom field and if custom field is empty return remaining posts
- Create custom field on post draft or publish?
- Using custom fields in a filter hook
- Add a post meta key and value only if it does not exist on the post
- Function to change meta value in database for each post
- Sorting posts by multiple values, combined
- WP_Meta_Query causing long-running MySQL queries
- trim custom field text value and show (…)
- Duplicate posts being displayed when querying Custom Fields
- How to validate custom field on lost password form before the user id field?
- Json api does not return all metadata
- Use custom field as a variable
- ACF: How to get the full field name (meta_key) by a field key?
- Woocommerce: Custom fields and email shortcodes, ec_custom_field
- Tweak Meta for Post to work it for Pages also
- Adding an editable field to template?
- Transferring author information from a custom field to a proper author
- How to select posts from multiple categories and metavalues?
- Linking Custom Fields to Database Records
- Stop sending email everytime I updates my post
- Best way to store everyday post views?
- Display list of terms having the same custom field value
- How to display custom field in woocommerce email orders? [closed]
- Custom meta is not being saved
- How can I activate custom fields checkbox in pages?
- Can I save post meta programatically without setting metaboxes?
- Show custom field on attachment page?
- WP Insert post with post_thumbnail
- custom comment_form fields not displaying
- WP_Query () using taxonomy, custom post types
- Ordering by ‘Title’ OR ‘Custom Field’
- How can I add/update post meta in a admin menu page?
- Save custom field types with this function…?
- Compare ACF date field (if exists) and post date and order DESC
- Add WordPress user custom meta to chartjs vertically stacked chart in Divi theme
- Delete a custom field in mysql for all posts with specific category id
- Trying to get custom field data in a simple plugin
- submitting form to admin-panel.php returns 500 error
- Create Meta boxes dynamically
- Outputting custom field on home.php not outside of blog list
- display Flexible Fields from options
- change attachment custom field onChange event
- How to filter post using custom feild value in shortest and longest duration?
- Advenced custom fields auto fill problem
- Custom Fields after update to WordPress 6