This is because output buffers are closed, but they’re never opened.
Adding this at the beginning of the shortcode will fix things:
ob_start();
Related Posts:
- Use AJAX in shortcode
- Filter the query ONLY for the search results page
- How to add attributes to a shortcode
- How to display random users with avatars
- Can shortcodes contain conditional statements? Even without them my shortcode renders blank page
- Creating a table from shortcode avoiding wpautop for each row
- Changing a function in function.php to a shortcode – for listing categories of only a certain post type
- Stripping shortcode from custom excerpt function
- Shortcode with custom content attribute?
- Custom page template how to check is_page from functions.php?
- Shortcode to insert menu in page body?
- Passing HTML in WordPress Shortcode arguments
- Programmatically set page template based on page ID
- Display a text message if the shortcode is found?
- Adjust which tempalte a page uses with a function?
- How to specify which Gutenberg blocks are available in the editor for a page template
- Custom Shortcode, functions PHP WP_Query loop
- Filtering posts by category name based on page’s slug
- Super simple shortcode not working
- Display gallery on top before content
- How to extract the variables out from “add_shortcode” function?
- is_account_page() change to page slug
- How to enable template page only for a post id page
- How to get specified parent page title in my function
- Possible to display shortcode based on the category?
- Shortcode pagination not advancing
- Having issues with a foreach inside of a shortcode with ACF gallery
- Display post shortcode content in the sidebar?
- How to get the index number of the posts?
- Using shortcode content with nested shortcode
- How to filter $content in shortcode function
- Create a custom taxonomy that will be used to create and filter markers in a Google Map
- Display gallery on bottom after content
- Excerpts are not displayed by a shortcode on category pages
- WordPress Shortcode function display outside of widget
- check if the user is owner of current page
- shortcode help require
- Pass parameter to hooked function using custom page template
- Help With Creating Shortcode
- Use html inside shortcode function
- Shotcode argument issues
- Exclude category from shortcode
- Visual Composer creating own shortcodes with vc_map() to return simple Image
- get_pages() Returns Only One Item
- Function shortcode – Set Parameter
- Adding an option to a shortcode
- How to use author meta in shortcode?
- Using multiple line variable inside a function?
- Use a shortcode to display custom meta box contents
- How to echo the value of an array element using a function via a shortcode
- Wp-query Order By problem
- Woocommerce checkout field
- How to create shortcode with html and php content?
- Tracking the number of shortcodes for a list?
- Need a method to prevent WP from adding in between my shortcodes
- Load scripts for do_shortcode( ‘ [ my_shortcode ] ‘ )
- Can I include a custom PHP function in a WordPress function?
- How to create a shortcode out of a php function
- Shortcode to get featured image of specific id post
- Shortcode of a function
- How to add a shortcode to call a function
- How can I call a PHP function inside a hardcoded shortcode?
- Problem with shortcode inside a shortcode
- Need help making a short code work
- Using One Function To Create Two Different Shortcodes
- Is it possible to create a shortcode to link to a specific post/page where the tag is just an attribute?
- Display a list of random terms from custom taxonomy with shortcode
- Pagination not working – FrontPage
- page shows short code not output
- How to Override Page Template if URL matches query?
- How Can I Create a Friendly Slug for a Dynamic Page?
- Last updated posts shortcode in functions.php
- Author social media aren’t shown on the page
- Shortcode to output category description by passing ID
- Help using ShortCodes to style whole chunks of the post
- Pagination won’t work on custom page
- How to retrieve image IDs from shortcode content?
- Display list of pages that contain a certain string within the slug
- HowTo: Add wrapper to columns shortcode?
- How To Show Shortcodes In WordPress Custom Fields?
- Edit meta fields from within template
- Shortcode Function – Can’t get anything else to return after running shortcode within shortcode
- Custom shortcode with do_shortcode and substr
- is_page_template wont allow me to enqueue scripts
- Can I use a function to return HTML and the result of another function?
- Expanding a function to call a plugin or show a link
- Trying to the deduce shortcode from a function
- How to display data from custom fields in my custom shortcode?
- Modify function Shortcode_atts
- Pull random comment from specific post, display on homepage with shortcode
- restrict access to specific urls on a specific period of time
- Run function from parent on child site
- Add title & subtitle to shortcodes
- Shortcode Variations?
- shortcode inside post called by ID does not render as expected
- Custom shortcode not being included in content paragraph [duplicate]
- Display function from functions.php in tag.php
- Creating mixture of shortcodes to use in the visual/text editor
- PHP error in shortcode [closed]
- Logout redirect via page template without confirmation?