Title: do_shortcode prints the shortcode
Last modified: August 20, 2016

---

# do_shortcode prints the shortcode

 *  [asgsoft](https://wordpress.org/support/users/asgsoft/)
 * (@asgsoft)
 * [14 years ago](https://wordpress.org/support/topic/do_shortcode-prints-the-shortcode/)
 * Hey guys,
 * I’ve been trying to use do_shortcode() through a plugin I am coding but it just
   prints out the shortcode as opposed to processing it.
 * Any thoughts?

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years ago](https://wordpress.org/support/topic/do_shortcode-prints-the-shortcode/#post-2772235)
 * > it just prints out the shortcode as opposed to processing it.
 * what shortcode are you trying?
 * be aware that some things in square brackets are **not **shortcode.
 *  Thread Starter [asgsoft](https://wordpress.org/support/users/asgsoft/)
 * (@asgsoft)
 * [14 years ago](https://wordpress.org/support/topic/do_shortcode-prints-the-shortcode/#post-2772236)
 * I am trying to use [http://wordpress.org/extend/plugins/mombly-review-rating/](http://wordpress.org/extend/plugins/mombly-review-rating/)
 * I’m pretty sure [Rating:2/5] is a shortcode :S
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years ago](https://wordpress.org/support/topic/do_shortcode-prints-the-shortcode/#post-2772239)
 * if you look at the general syntax of WordPress shortcodes – [http://codex.wordpress.org/Shortcode_API](http://codex.wordpress.org/Shortcode_API)–
   I am quite sure that your example is not shortcode.
 * try to contact the plugin author directly – as suggested in the plugin’s FAQ 
   [http://wordpress.org/extend/plugins/mombly-review-rating/faq/](http://wordpress.org/extend/plugins/mombly-review-rating/faq/)
 *  [luckdragon](https://wordpress.org/support/users/luckdragon/)
 * (@luckdragon)
 * [14 years ago](https://wordpress.org/support/topic/do_shortcode-prints-the-shortcode/#post-2772245)
 * actually alchymyth, in this situation, that IS a shortcode that the guy has defined.
   quoting his readme: “The format to add a rating is simply just [Rating:3.5/5]”
 * what asgsoft neglected to mention is that he’s trying to use the shortcode of
   one plugin in the output of another plugin. the easiest way to do that is to 
   call the function that the “shortcode” is supposed to call.
 * In This instance.. he should create the output as he is, then, before he echos
   it, call: $output = mombly_rating_addRating($output);
 * then echo it.
 *  [luckdragon](https://wordpress.org/support/users/luckdragon/)
 * (@luckdragon)
 * [14 years ago](https://wordpress.org/support/topic/do_shortcode-prints-the-shortcode/#post-2772246)
 * also, asg, this forum is hard enough to get around in, creating multiple topics
   for the same problem doesn’t make it any easier
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years ago](https://wordpress.org/support/topic/do_shortcode-prints-the-shortcode/#post-2772265)
 * [@luckdragon](https://wordpress.org/support/users/luckdragon/)
    once and for 
   all – it is **NOT** shortcode. (full stop)
 * please read the WordPress ‘shortcode API’ as linked already in one of my replies.
 * the plugin uses filter functions:
 *     ```
       add_filter('the_content', 'mombly_rating_addRating', 1);
       add_filter('the_excerpt', 'mombly_rating_addRating', 1);
       ```
   
 * with preg_match:
 *     ```
       $matchint = preg_match_all("/\[Rating:(\d+\.?\d*)\/(\d+\.?\d*)\]/", $content, $matches, PREG_SET_ORDER);
       ```
   
 * there is no `add_shortcode()` or anything like it in the plugin code.
 * however, you have a valid point with your suggestion to try and use the function
   code directly.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years ago](https://wordpress.org/support/topic/do_shortcode-prints-the-shortcode/#post-2772266)
 * _[I am closing this topic as a duplicate of [http://wordpress.org/support/topic/an-issue-with-a-wordpress-plugin-calling-external-shortcodes?replies=14](http://wordpress.org/support/topic/an-issue-with-a-wordpress-plugin-calling-external-shortcodes?replies=14)–
   please continue with that topic]_

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘do_shortcode prints the shortcode’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/do_shortcode-prints-the-shortcode/#post-2772266)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
