Just remove the shortcode during the first call.
add_shortcode( 'foo', 'foo_shortcode_handler' );
function foo_shortcode_handler()
{
remove_shortcode( 'foo' );
return 'bar';
}
Related Posts:
- How to add a shortcode button to the TinyMCE editor?
- How to include code only on specific pages?
- how to include other plugins css files in a shortcode?
- What characters are allowed as a shortcode tag and how should they be sanitized?
- PHP Deprecated: Non-static method should not be called statically
- Loading shortcode with ajax
- Cannot strip JW Player shortcode?
- How to pass multiple values in shortcode?
- append stylesheet via shortcode
- Calling function from within functions.php returns unwanted value
- plugin shortcodes not working on custom theme- unsure how to fix
- How to list all active and specific shortcodes in wordpress
- Nested shortcodes
- do_shortcode() doesn’t work if shortcode contained in variable, works if shortcode passed as string
- Plugin shortcode won’t work on a custom template file [closed]
- shortcodes displaying outside of content area with echo statement, not what I wanted [duplicate]
- Trying to count the total number of paragraphs inside a blog article
- How Can I Pass the Shortcode’s $atts Variable to the Plugin’s Javascript Function
- Adding json as params to shortcode
- Shortcode is not working in homepage page template (custom front page)
- May i Use ShortCode in Template?
- Confused about shortcode and settings values
- Running jquery script after shortcode [closed]
- How can I create a custom shortcode that will return a custom post type by ID?
- Adding Shortcode to Text Widget
- How to add an automatic refresh in WordPress for a Page/Post or an embedded OneDrive/Excel HTML Code?
- Nested shortcode functions accessing variable
- Calling an attribute from a plugin shortcode
- Best place for short bio,image and button [closed]
- accessing wp.media api from a tinymce plugin
- Visual Composer shortcode for child theme dir
- get_post_title is not working on homepage
- How to create a custom shortcode based on the layout?
- How do I apply style to each category of a list?
- Create shortcode to echo javascript
- Redirect to another page using contact form 7? [closed]
- Custom Shortcode Broken in WordPress 3.1
- Namespaced shortcode?
- Anyway to convert a plugin to become a shortcode?
- How can I run a custom shortcode function on a live site and only run if the viewer is a specific machine?
- Displayed content disappears when adding attributes to shortcode
- How do I pass custom shortcode-extracted variables (taxonomy) into a query function for WordPress RoyalSlider?
- Shortcode does not expand in Facebook like
- shortcode – multiple instances of same parameter name in one shortcode instance
- Function call in wordpress short code handler fails
- strange shortcode error: does shortcodes requires any dependency?
- wp_localize_script not passing the data
- Get post content from outside the loop with plugin shortcode usability
- How to rewrite URL and get the values?
- Is there a good way to load tiny_mce_popup.js through editor.windowManager.open?
- How to prevent tabs from opening all at once
- Executing Javascript in Plugin
- Is there any way to inject text onto pages?
- Create Short code dynamically
- Get variable value based on string constant
- How can I replace content on site generated from plugin without changing plugin
- How To Use do_shortcode with WooCommerce One Page Checkout
- WordPress load same script two times
- how to display a template.php in a shortcode
- How to get current cart values using WC_Shortcodes?
- Can I add Short Code Of A Plugin In The Code Editor of WordPress?
- insert og image link in wordpress post
- Get a value from a shortcode for another function
- How to check if short code is present in template?
- Shortcode do not return the right data in post
- How to call function in WordPress on button click?
- Hide content for specific users with id
- Why is my shortcode not working?
- using WPPB shortcodes without the plugin
- save short-code in my custom plugin settings problem missed something
- Do_shortcode before send email content
- WordPress show descriptions under images in gallery
- How to use a shortcode of a plugin in another plugin php file
- Bootstrap carousel – Using shortcode inside enclosing shortcode
- How to store multiple instances of the plugin’s options for various shortcodes
- Modify Plugin PHP Class in Child Theme – Correct Method
- Modify Plugin shortcode function code
- Meta box or shortcode help
- function of parent not working in childtheme
- Call/Run a Mathematica (.m) Shell Script from WordPress Page/Blog
- Posting code inside the post instead of in the template file using shortcode
- How to use shortcode of any plugin to show it visually where i want?
- Why function hooked using object are executing at all time?
- How to Set Limit with WordPress Get Bookmarks Shortcode
- Need to change contact email depending where user is from
- Pulling RSS from site and display it in posts
- Trying to Understand Shortcodes.
- Shortcode return is printing a 1 afterward
- How to use ‘Event Manager Shortcodes’ plugin via the php code? [closed]
- Any way to hook into WP after a page displays?
- WordPress shortcode plugin not working
- Integrate Razorpay quick payments plugin with contact form7 plugin
- WP Customer Reviews call short code on another page [closed]
- Display HTML5 jQuery Audio Player On Front Page
- Shortcode returning specific content of a post
- Invalid argument supplied for foreach()
- cURL External API request displays content above other content on page
- Beginner question: Accessing js script in plugin
- thumbnail_width not working in wordpress most popular post plugin
- Display file contents within Plugin