Your shortcode function callback must return the output, like this:
function gamma_gallery( $attr ) {
$html="";
// your stuff, where all the output is assigned to the $html variable
return $html;
}
or you could try the output buffering:
function gamma_gallery( $attr ) {
$html="";
ob_start();
// your stuff
$html = ob_get_contents();
ob_end_clean();
return $html;
}
Related Posts:
- How to customise the output of the WP image gallery shortcode from a plugin?
- Validation error: Extending Gutenberg gallery block
- Using nextGen Gallery.. how can I call a list of all Gallery Names?
- Two embedded gallery in one post
- Calling function from within functions.php returns unwanted value
- How to get all attachment image from post ?? WordPress
- Storing image gallery plugin data
- problem with nextgen plugin
- NextGen Gallery – automatically create gallery sub page?
- Changing image size to full size in Gutenberg’s block gallery
- How do I create a full-bleed background image on text mouseover? [closed]
- Get a list of galleries from an album in NextGEN Gallery [closed]
- How to add a random image to a post from gallery and only show one?
- Plugin for gallery with thumbnails?
- How do I turn a custom post type into a plugin?
- Image gallery plugin [closed]
- Debugs/errors in oqey gallery
- Howto accurately position images with maximum flexibility?
- Is any gallery plugin available to generate galleries from existing uploaded images? [closed]
- Theme is Causing Ajax Conflicts for a plugin I cant identify it
- Removing an action from wp_footer called in a class that’s inside a bigger class
- Can we have an ‘Update metadata’ button in Image Gallery for all image instances?
- Image Manager Plugin [closed]
- Retrieving links and names of images from a NextGEN gallery [closed]
- How do I create a Client Logos section in admin menu?
- Basic gallery plugin suggestion [closed]
- what is name of this plugin used for photo gallery page [closed]
- Fullscreen gallery plugin [closed]
- Best portfolio/gallery/carousel slideshow plugin with thickbox? [closed]
- How to have a gallery in which each image’s caption is a whole “post”?
- How to get images using taxonomy ( WP Media Folder)
- Image Galleries for website migrated from .com to .org
- Default WordPress gallery or very lightweight alternative to it?
- Advanced custom fields and Slideshow gallery desn’t work together? [closed]
- Create Short code dynamically
- Portfolio Slideshow Sliders Behaving Oddly When in jQuery Ui Tabs
- Adding Gallery to Footer of Homepage
- Can I remove an image from the Gallery without deleting it from the Media Library?
- Advanced video gallery plugin needed [closed]
- Plug-in that shows x number thumbnails from another post
- Any gallery plugins that allow commenting on single images?
- jQuery gallery plugin to interface with Picasa
- Looking for a photo gallery plugin [closed]
- WordPress Gutenberg custom block
- How to add gallery to post and make seperate album page with gallery link to post?
- Displaying all the images from all of my articles
- WordPress show descriptions under images in gallery
- Custom Gallery plugin uploading to different dir, and post to page
- Render Shortcode in Lightbox Gallery
- Render Shortcode in Lightbox Gallery
- How can I disable Jetpack plugin on mobile?
- How to move WordPress gallery image out of the link?
- Get url of selected gallery images?
- how to open image gallery in a post/page?
- Multiple thumbnails and one gallery
- How to show an image popup when one clicks on an image thumbnail?
- Any plugins that upload, resize, and display images? [closed]
- Display Facebook photo albums and photo comments?
- Continuous jQuery Slider / Carousel Plugin with linkable slides [for WooCommerce]
- How to show image caption in Woocommerce gallery
- ‘Global’ settings page for multisite plugin
- How do I cleanly override a plugin’s CSS with a child theme?
- PHP code on Visual Composer Plugin
- How are plugins in the WordPress plugin directory ranked?
- How to make a list of companies’ information and display them to user, using custom post types and a custom taxonomy?
- update_meta_user difference in i:1 and b:1, how to write b:1
- resize only height using wp_get_image_editor
- View the source code of a 3rd party plugin? [closed]
- How to crop image from center using wp_image_editor
- Deactivate plugin upon deactivation of another plugin
- How to find out what blocks are added by a plugin
- Use plugin or custom post type for game score functionality
- How can I see the error generated by plugin activation?
- How To Clean The Malware Infected & Hacked WordPress Websites? [duplicate]
- How to periodically scrape and cache strings from remote txt files. – My First Plugin
- Pull out Advanced Custom Fields in Related post plugin
- How to make a proper custom post type link
- Can’t Update or Delete Plugins From WordPress
- Preg Match All doesn’t Allow echo first character for WordPress Taxonomy Tags
- Is there a way to test that readme looks in other language before submitting translation?
- ob_start() combined with wp_query
- How to use get_template part in the plugin?
- How can I use get header from within my plugin?
- Free shipping for certain items only – or get local pickup as option if item is set to virtual
- Elementor Gallery issue [closed]
- How do I publish portfolio items with a future date?
- What form should the $query media query array have for an Elementor page builder function? [closed]
- WooCommerce: Force coupon for existing/registered customers [closed]
- WP REST API GET Method Works But Not The POST Method
- Show prices with tax Inclusive in Minicart widget
- Adding category base to url in custom post giving 404?
- Custom fields not showing up in the user info (PaidMembershipsPro)
- WordPress Theme Conflict With Plugin
- Why isn’t my plugin seeing other classes?
- Saving custom form fields
- wp_insert_post_data filter to set category
- Do shortcodes affect page indexing by search engines?
- Suitable hook when creating, updating and deleting posts programmatically
- How can I gather forums posted by visitors from different sites in one place? [duplicate]
- Does anyone recognize these table names?