Check the $str
with get_shortcode_regex()
. If $match
is returned, you need to parse $str
with do_shortcode()
and then return it, else false proceed.
UPDATE
After Sleeping, and while researching to answer your comment, has_shortcode()
should be replaced by get_shortcode_regex()
, which I have done in my original above.
Related Posts:
- How to return a string that has a jQuery and Ajax inside in a shortcode?
- PHP Helper Class to create shortcodes
- Having trouble creating two shortcodes, one for logged in user and one for visitors
- Add two or multiple functions in WordPress Post or Page
- WP Custom tables query
- Woocomerce custom add to cart button edit functionality [closed]
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- Accessing data from a non-WP database/table within a page content
- Different loop output every x posts in custom post type
- WordPress blog post url on category page
- How to output a PHP file values by shortcode?
- Showing content from one page on another
- Changing layout with wp_customise
- WP dynamic featured image – Can’t get second featured image url
- Converting HTML Template to WordPress Theme
- Extending the WP_Widget_Text class
- Showing a different gallery in a seperate post
- How to display posts by current user in a drop down
- Selectbox in admin panel function linking to CSS
- Can I install/embed WordPress on a ‘single page’?
- Create own WordPress shortcode gallery
- Get value from shortcode to do something
- How to check if a meta value has already been assigned to any user?
- How to hide products that do not have an image from a slider carousel for an ecommerce webpage?
- How to exclude category ID from Looper in WordPress
- Add a specific part of current category page url to shortcode
- How to display data from custom table in wordpress phpmyadmin
- Calculating a large number of MYSQL queries as customshort codes, slow
- Customize Theme comment template to Insert VoteUp and VoteDown buttons
- filter default query to show just selected level of child pages in wordpress
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- Trying to build simple deposit code that hooks into woocommerce
- How to pick the default selected value in wordpress dropdown?
- WordPress Shortcodes.. printf is outputting a random number… Can’t figure out WHY?
- Colon is Missing In My Website Url in WordPress
- Add New User, extra fields which are required?
- user_profile_update_errors hook not executing
- Send an email to specific adress when button is clicked?
- Customizer: active_callback and sanitize_callback incompatibility?
- Saving and Restoring a Canvas on A Individual User Basis
- Redirect specific user role to specific site after login?
- Send multiple attachments with wp_mail in PHP
- WordPress admin pointers tour bug?
- Custom shortcode outputs plain text instead of HTML at top of post
- How to use wp_add_inline_style for custom CSS added via shortcode?
- custom url rewrite for wordpress
- Extend plugin Class through functions.php
- Pass php dynamic variable to shortcode
- How can I dynamically update the class in my shortcode?
- Creating own shortcode – echoeing php variable based on JS variable
- How to add a do_action on refreshing of WP customizer?
- Customize position of social icons in upme plugin [closed]
- Weird 404 URL Problem – domain name being placed at end of urls
- How to get the value of input hidden html from text editor to custom page template?
- Make a list of sites for each user in WPMU – switch_to_blog (display in SITE_ID: 1)
- Menu jumping when calling it via PHP
- How create a Shortcode with hover and complex options
- Output Video Download Link in template
- Remove from shortcode
- Modify custom field input data before creating a new post
- Displaying recent posts on static page with template-part via shortcode
- Output custom field value to post string
- wordpress 4.4 self hosted video (html5) doesn’t show
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- do_shortcode with custom field
- Using $wpdb (WPDB class) ‘replace’ with multiple WHERE criteria problem
- Media Upload , file name changed automatically
- How to Reference/Echo Variable from Another PHP Function
- Remove echo from shortcode
- Custom posts in different columns style
- Need help enqueueing webfonts
- need help with existing code showing subpages
- Insert custom PHP head above in WP pages
- Shortcode to show the code
- How do I add a custom css to all posts without affecting homepage css? [closed]
- how to show only specific category for a template
- Shortcode returns values in the wrong order
- Redirect to another page using contact form 7? [closed]
- Custom Background by Page IDs
- Get URL from shortcode tag
- Embedding PHP in shortcode $content
- Shortcode with PHP issue “Undefined index”
- Excecuting php function in shortcode
- Only first shortcode gets executed
- Advanced Custom Fields not displaying
- How to get private property in parent class into extended class?
- Multiple do_shortcode in page template
- How to obtain the current website URL in my theme?
- What exactly do this function declared into functions.php file of a WP theme?
- “operation successful” message
- Returning data instead of echoing/printing
- echo something inside a shortcode
- displaying content that includes shortcodes within an echo
- List taxonomy term slugs within shortcode (do_shortcode)
- Shortcode from a function not working
- Exclude posts with specific metadata from search?
- Display Data in Table from External Database in WP using Shortcodes
- Change order of custom submenu link in WP Admin?
- Underscore – Self hosted fonts
- get_posts works in the page template but not in a shortcode