Title: Shortcode not resolving
Last modified: August 22, 2016

---

# Shortcode not resolving

 *  Resolved [Jurjen](https://wordpress.org/support/users/jurjen/)
 * (@jurjen)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/shortcode-not-resolved/)
 * Hi there,
 * It might be that I’m overcomplicating my code, but it seems that my WP site doesn’t
   know how to resolve the Colorbox shortcode.
 * Since I have a multilingual site (using mqTranslate), I have to create several
   version and with a stubborn widget I had to embed everything write into the HTML/
   PHP codes.
 * This is the result:
    `<?php _e('[:en][wp_colorbox_media url="#contactbox" type
   ="inline" hyperlink="Please use the contact form..."][:fr][wp_colorbox_media 
   url="#contactbox" type="inline" hyperlink="S\'il vous plaît utilisez le formulaire
   de contact..."][:nl][wp_colorbox_media url="#contactbox" type="inline" hyperlink
   ="Gelieve het contactformulier gebruiken..."]'); ?>`
 * With a bit further on in the file (as shown in the example on your website:
 *     ```
       <div style="display:none">
       			<div id="contactbox" style"padding:10px; background:#fff;">
       				[cscf-contact-form]
       			</div>
       		</div>
       ```
   
 * WordPress properly recognizes the language codes for mqTranslate and thuss only
   shows the shortcode that I’ve written for the specific language. However, it 
   doesn’t resolve the Colorbox shortcode. It might very well be related to the 
   plugin, which is why I’m posting the question here.
 * Any ideas?
 * Thanks!
 * [https://wordpress.org/plugins/wp-colorbox/](https://wordpress.org/plugins/wp-colorbox/)

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

 *  Plugin Author [Noor Alam](https://wordpress.org/support/users/naa986/)
 * (@naa986)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/shortcode-not-resolved/#post-5638461)
 * Hi, I have just released another update. You should be able to embed shortcode
   in a text widget now.
 *  Thread Starter [Jurjen](https://wordpress.org/support/users/jurjen/)
 * (@jurjen)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/shortcode-not-resolved/#post-5638462)
 * Thanks for the quick reply and even plug-in update!
 * However, the problem still exists.
 *  Thread Starter [Jurjen](https://wordpress.org/support/users/jurjen/)
 * (@jurjen)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/shortcode-not-resolved/#post-5638551)
 * I tried all sorts of things:
    - I removed the language codes
    - I renamed the ID to avoid maybe using the same ID as another element
    - Used WP debug and FireFox element inspector
 * Nothing fixes the problem.
 * The code is inside the PHP file of my widget (not in an actual text field in 
   the SQL database), which is inside the folder of the theme.
 * As mentioned, it’s being outputted by php _e().
 * Maybe that could indicate where the problem is?
 *  Plugin Author [Noor Alam](https://wordpress.org/support/users/naa986/)
 * (@naa986)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/shortcode-not-resolved/#post-5638559)
 * You might need to filter the shortcode through `do_shortcode` function since 
   you are executing it in a php widget.
 * [http://codex.wordpress.org/Function_Reference/do_shortcode](http://codex.wordpress.org/Function_Reference/do_shortcode)
 *  Thread Starter [Jurjen](https://wordpress.org/support/users/jurjen/)
 * (@jurjen)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/shortcode-not-resolved/#post-5638575)
 * Indeed, the `do_shortcode` made it work in the end! Unfortunately the translations
   didn’t work any more after that.
 * I ended up replacing your shortcode by the actual HTML code it should output 
   to make it work with the translations: `<a class="wp-colorbox-inline" href="#
   contactbox"><?php _e('translated texts'); ?></a>`
 * Not sure if you can improve this for future versions, but I just wanted to give
   you the feedback.
 * And I’m glad you but me on this track since I needed the `do_shortcode` to make
   the shortcode work that I wanted to put inside the colorbox. 😉
 * Thanks again!

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

The topic ‘Shortcode not resolving’ is closed to new replies.

 * ![](https://ps.w.org/wp-colorbox/assets/icon-128x128.png?rev=2610062)
 * [WP Colorbox](https://wordpress.org/plugins/wp-colorbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-colorbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-colorbox/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-colorbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-colorbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-colorbox/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Jurjen](https://wordpress.org/support/users/jurjen/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/shortcode-not-resolved/#post-5638575)
 * Status: resolved