Title: PHP Command Outputting Shortcode to Front End
Last modified: September 1, 2016

---

# PHP Command Outputting Shortcode to Front End

 *  Resolved [Daniel](https://wordpress.org/support/users/ddumondgmailcom/)
 * (@ddumondgmailcom)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/php-command-outputting-shortcode-to-front-end/)
 * Hello,
 * The following command:
 *     ```
       <div class="menu-description">
       <?php if($menuname_category != '') :?>
       <?php $menuname_slugs = explode(',', $menuname_category);?>
       <?php $cat_menu = get_term_by('slug', $menuname_slugs[0], 'menu_type');?>
       <?php echo $cat_menu->description;?>
       <?php endif;?>
       </div>
       ```
   
 * Is resulting in this:
    **[:en]With Tomato Sauce[:fr]Avec sauce tomate[:]**
 * Is there anything I need to include so that it recognizes the tags?
 * Thanks in advance for your help.
    Dan
 * PS: I’m not very savvy when it comes to PHP so please be gentle! 🙂
 * [https://wordpress.org/plugins/qtranslate-x/](https://wordpress.org/plugins/qtranslate-x/)

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

 *  Thread Starter [Daniel](https://wordpress.org/support/users/ddumondgmailcom/)
 * (@ddumondgmailcom)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/php-command-outputting-shortcode-to-front-end/#post-7534264)
 * I’m not sure if it makes a difference, but this code is used inside a custom 
   widget. It’s meant to display the “category descriptions” from a “custom post”.
 *  Thread Starter [Daniel](https://wordpress.org/support/users/ddumondgmailcom/)
 * (@ddumondgmailcom)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/php-command-outputting-shortcode-to-front-end/#post-7534271)
 * Hahah! I did some digging on your forum and found the solution!
 * I just had to change:
    `<?php echo $cat_menu->description;?>`
 * to:
    `<?php echo __($cat_menu->description);?>`
 * Sweet!! 🙂
 *  Plugin Author [John Clause](https://wordpress.org/support/users/johnclause/)
 * (@johnclause)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/php-command-outputting-shortcode-to-front-end/#post-7534287)
 * Yes, this would work, although a bit less efficient than this solution:
    [https://qtranslatexteam.wordpress.com/faq/#DevelperNotes](https://qtranslatexteam.wordpress.com/faq/#DevelperNotes)
 * Moreover, if you take the [latest version](https://github.com/qTranslate-Team/qtranslate-x/archive/stable.zip),
   it might have $cat_menu->description already translated at front end in your 
   code.
 * It would be great if you test that latest version for term handling: add term
   in a various ways, remove, edit, etc. It has some fixes and improved term handling.
   Every tester’s input is very valuable for us.
 * If you find a problem, it is better to report via [contact form](https://qtranslatexteam.wordpress.com/contact-us/)
   for quicker processing.
 * Thanks a lot!
 *  Thread Starter [Daniel](https://wordpress.org/support/users/ddumondgmailcom/)
 * (@ddumondgmailcom)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/php-command-outputting-shortcode-to-front-end/#post-7534616)
 * Thanks for the helpful feedback John! 🙂
 * I didn’t realize newer versions of the plugin was available for download and 
   use outside the wordpress platform.
 * Just curious as to why this is? I’m so used to updating via the plug-ins section
   of my websites.
 * Is there an approval process (like what apple does with their apps) before stable
   versions of plug-ins are available within WordPress?
 * Cheers!
 *  Plugin Author [John Clause](https://wordpress.org/support/users/johnclause/)
 * (@johnclause)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/php-command-outputting-shortcode-to-front-end/#post-7534617)
 * Even within WP interface, you may upload a new plugin if you have a .zip file.
   There is nothing special about it, anyone can install any plugin by uploading
   a .zip file, or even simply putting a folder with plugin’s files on file system
   via FTP, for example. When WP does update, they simply take such a .zip file 
   from a designated place.
 * Yes, we test things a lot before making a new version available via WP designated
   place. Read about plugin development in WP docs, for example: [https://wordpress.org/plugins/about/faq/](https://wordpress.org/plugins/about/faq/)
   People take plugin for testing from other places, depending on how an author 
   of a plugin designed it.
 * Many, if not most, of plugins have a repository at GitHub, like us, [https://github.com/qTranslate-Team/qtranslate-x](https://github.com/qTranslate-Team/qtranslate-x),
   where people can see the code test it, discuss it and suggest modifications via
   [pull requests](https://github.com/qTranslate-Team/qtranslate-x/pulls).
 * You are welcome to join the community!
 *  Thread Starter [Daniel](https://wordpress.org/support/users/ddumondgmailcom/)
 * (@ddumondgmailcom)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/php-command-outputting-shortcode-to-front-end/#post-7534618)
 * Hey John! Thanks for the invite — I would certainly need to create a test site
   in order to take advantage of this.
 * I actually knew you could manually install a “zipped” file through the “add plugin”
   feature within WordPress — What I didn’t know is that there are “stable versions”
   of the plugin out there that aren’t recognized from within the WordPress platform.
 * Just curious as to why (if they’re marked as stable) they are not released through
   the WordPress platform?
 * I know we’re off topic here, but I appreciate the insight.
 * Cheers! 🙂
 *  Plugin Author [John Clause](https://wordpress.org/support/users/johnclause/)
 * (@johnclause)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/php-command-outputting-shortcode-to-front-end/#post-7534619)
 * “Stable” is just a name of the branch we currently use for the latest version.
   It is still being tested though. There is a problem with some advanced caching
   plugin, for example, which most people would not care, but we still want to make
   it clean … and so on … and so forth.
 * Best!

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

The topic ‘PHP Command Outputting Shortcode to Front End’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/qtranslate-x_f9f9f9.svg)
 * [qTranslate X](https://wordpress.org/plugins/qtranslate-x/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/qtranslate-x/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/qtranslate-x/)
 * [Active Topics](https://wordpress.org/support/plugin/qtranslate-x/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/qtranslate-x/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/qtranslate-x/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [John Clause](https://wordpress.org/support/users/johnclause/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/php-command-outputting-shortcode-to-front-end/#post-7534619)
 * Status: resolved