Plugin Directory

WPML Shortcodes

Adds shortcodes to the WPML environment, like wpml__, wpml_e and more. Makes WP full WPML ready.

Adds the wpml__ and wpml_e functions to your theme and the wpml__ shortcode to your WordPress website. Make your WordPress full WPML ready

<?php wpml__( $text, $context ); ?>
<?php wpml_e( $text, $context ); ?>

Similarly to the behaviour of the __, _e functions, you must provide a string to make translateable and a context. That's it; just provide translations from the WPML > String Translations admin panel.

Check how to use the shortcode below.

Usage (via code)

<h1><?php echo wpml__( 'Title', 'wpmlshortcodes' ); ?></h1>
<h2><?php wpml_e( 'Subtitle', 'wpmlshortcodes' ); ?></h2>

Usage (via shortcode)

<h1>[wpml__ context=wpmlshortcodes]Title[/wpml__]</h1>
<h2>[wpml__ context=wpmlshortcodes]Subtitle[/wpml__]</h2>

NEWS! WPML Translate (+ shortcode)
Adds the wpml_if (ex wpml_translate) shortcode to your WPML suite. You can also use the wpml_e__if_language( $content, $lang ) in your php code.

Usage (via code)

wpml_e__if_language( 'Text', 'en' );
wpml_e__if_language( 'Testo', 'it' );

Usage (via shortcode)

[wpml_if lang='en']Text[/wpml_if][wpml_if lang='it']Testo[/wpml_if]


Pull requests on github.com.

Author: Mirco Babini, Web Developer and Mobile App Developer; WordPress Consultant.

Requires: 2.8 or higher
Compatible up to: 4.4.2
Last Updated: 2 weeks ago
Active Installs: 200+


5 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.