When you define your shortcode, you might try one of a couple “if” statements to fix this issue, until you have time to create separate shortcodes.
function cfgeo_shortcode( $atts, $content = "" ) {
if (!isset($content) || stristr($content,'cfgeo')!==FALSE){
// do short shortcode stuff here
} else {
// do 'Container' shortcode stuff here
}
return $output;
}
add_shortcode( 'cfgeo', 'cfgeo_shortcode' );
I would also recommend … when you create your replacement shortcodes, you should not only create separate codes, you should also avoid parameters with keywords like “return” and “include” for their respective names.
Good luck! Hope this was helpful.
Related Posts:
- Run Shortcode of post’s custom field in functions.php / Plugin
- PHP error with shortcode handler from a class
- Add self-closing shortcode button to TinyMCE in WP 4.6
- Optimize shortcode callbacks
- How would I create a plugin for my shortcodes?
- How to prevent newline from appearing in shortcode?
- Shortcode adding p and br tags
- Are shortcodes case-sensitive?
- Enqueue script only when shortcode is used, with WP Plugin Boilerplate
- the_content after all shortcodes are parsed
- Allowing for multiple template views on the Gallery Settings page when using the Visual Editor
- Is it possible to remove next-post / previous-post with out creating a custom template?
- How to make WordPress use non-greedy shortcode parsing?
- Multiple Parameters for a Shortcode
- How do I make specific plugin functionality apply to different sites in a network?
- How to ensure “the_content” filter runs only for the main displayed content?
- Shortcodes, output buffering, and WordPress functions
- Filter on the_content ignores shortcodes
- Filter to change the content of 404 page
- stray elements
- Pass javascript result to shortcode executer function
- Front-End Form Submission in Shortcode
- How to get shortcode to work inside a foreach loop called within a shortcode?
- Get returned variable from a function to add_shortcode function
- What is rich_editing?
- Why is my shortcode not working
- Error : “Updating failed: The response is not a valid JSON response” with custom shortcode
- On plugin deactivation hide its shortcode
- Can’t get JS code to work with shortcode
- add_shortcode is not working [duplicate]
- How can I render shortcode so that its not cached by Caching plugins?
- Is it possible to delay execution of shortcode output callback?
- Processing shortcodes in groups (separated by line breaks)?
- Finding the paragraphs in content
- How do I write a shortcode that opens and closes?
- Using a Shortcode to Replace Themes Stylesheet?
- $content variable – Is this a reserved variable for a WordPress function? – php / wordpress
- Gutenberg Block showing invalid content on edit
- Creating a shortcode, but getting tied up with OOP and Classes?
- Storing product price data in the database
- What is the best way to embed an JS App in a WordPress Page?
- What is the proper way to include Bootstrap when executing a shortcode
- Auto gallery from folder contents
- Secure Pages Best Practice
- Adding option to Gallery shortcode
- add_shortcode() not working inside of function
- How to filter the_content() & include content from template
- Asynchronously render shortcodes in TinyMCE visual editor
- Custom login doesn’t work properly
- Is using custom table to suit business needs instead of transients a big hit to page load speed?
- Caching the_content calls
- Shortcode returning localized HTML part
- Hide shortcodes “code” when using the “editor” the same as wordpress do with “gallery”
- Enumerating shortcode attributes in JavaScript
- Wrap text around shortcode
- wp_nonce_field displaying twice
- What happens when two or more plugins use the same hook?
- How to handle shortcodes through plugin
- Using a custom shortcode from within the template of a shortcode plugin
- When echoing my own shortcode, it keeps adding a 1 at the end of my blogpost
- ECHO Executing 4 Times In Head
- Automating the process of shortcode generation in a plugin – how is it done?
- Create Widget or Enable Shortcodes in Sidebar
- Inserted double quote when prepending to the_content
- shortcode executed in the page editor
- Shortcode not appearing when used as post content in wp_insert_post() or possibly, shortcode not being registered at all
- Add function after the_content
- How to make my shortcode load scripts and styles, from within the plugin?
- How to display the categories on page using shortcode?
- How to create ShortCode
- How to display the specific post content by using POST ID
- How to output functions from plugin inside theme
- add_filter img_caption_shortcode not implemented
- shortcode tags not working in do_shortcode
- Information on plugin adding text when a post, page, or other such is displayed
- How to insert HTML/CSS/JS into my iframe plugin?
- Including template in shortcodes
- Form submission to another page returning 404 error [duplicate]
- Passing values between enclosing and enclosed shortcodes
- Can / should a widget plugin define its own Widget Area?
- post content and shortcode content displaying out of order
- Font size of HTML content
- Cannot output plugin twice with shortcode
- Paragraph Tags removed when contents are only a shortcode
- How to call a function from a shortcode function in an oop plugin
- How to Create custom block for displaying information in content section which act like shortcode
- WPGut – Updating failed and shortcode?
- Is there a way to get rendered html content of a WP post after updating?
- How to write a custom shortcode name book?
- By adding “?login – failed” code unable to access my dashboard
- How can I pass WP_Query results to a plugin?
- How can we stop showing short code in create or edit post section
- Shortcode content is not showing. Only the [shortcode-tag] is showing
- Including content into an add_shortcode() function
- Pass javascript result to shortcode executer function
- Some data has already been output, can’t send PDF file – fpdf issue in WordPress
- How do I make two shortcode use the same id and increment it when I use them multiple times?
- Shortcode from a plugin not working
- Which filter to use to pre-parse form elements, which are generated by plugin’s shortcode?
- Custom signature appears twice on page