Title: WPGlobus &amp; Custom Content Shortcode
Last modified: September 1, 2016

---

# WPGlobus & Custom Content Shortcode

 *  Resolved [marcAroma](https://wordpress.org/support/users/marcaroma/)
 * (@marcaroma)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/wpglobus-custom-content-shortcode/)
 * Hi there,
 * I am using your awesome plugin for a multiple language website, and also the 
   Custom Content Shortcode plugin from Eliot Akira.
 * But when I pull e,g, the title of a page/post it returns me all languages. Is
   there a way to get just the one the user currently selected?
 * Thank you for your help!
    Marc
 * [https://wordpress.org/plugins/wpglobus/](https://wordpress.org/plugins/wpglobus/)

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

 *  Plugin Support [Alex Gor](https://wordpress.org/support/users/alexgff/)
 * (@alexgff)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/wpglobus-custom-content-shortcode/#post-7464276)
 * hello,
    you can use next piece of code
 *     ```
       add_filter( 'ccs_loop_all_results', 'ccs_loop_all_results' );
       function ccs_loop_all_results( $results ) {
   
       	foreach( $results as $key=>$result ) {
       		$matches = array();
       		preg_match_all( '/{:[a-z]{2}}(.*){:}/m', $result, $matches );
       		if ( ! empty( $matches[0] ) ) {
       			foreach( $matches[0] as $match ) {
   
       				$results[ $key ] = str_replace( $match, WPGlobus_Core::text_filter($match, WPGlobus::Config()->language), $results[ $key ] );
   
       			}	
   
       		}
       	}
       	return $results;
       }
       ```
   
 *  Thread Starter [marcAroma](https://wordpress.org/support/users/marcaroma/)
 * (@marcaroma)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/wpglobus-custom-content-shortcode/#post-7464384)
 * Hello Alex,
    How and where would I add this code in order to use it with [https://wordpress.org/plugins/custom-content-shortcode/](https://wordpress.org/plugins/custom-content-shortcode/)?
 * Thank you,
    Marc
 *  Plugin Support [Alex Gor](https://wordpress.org/support/users/alexgff/)
 * (@alexgff)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/wpglobus-custom-content-shortcode/#post-7464393)
 * in file functions.php of your theme
 *  Thread Starter [marcAroma](https://wordpress.org/support/users/marcaroma/)
 * (@marcaroma)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/wpglobus-custom-content-shortcode/#post-7464408)
 * Thank you Alex, I’ll give it a try 🙂

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

The topic ‘WPGlobus & Custom Content Shortcode’ is closed to new replies.

 * ![](https://ps.w.org/wpglobus/assets/icon-256x256.png?rev=1069705)
 * [WPGlobus](https://wordpress.org/plugins/wpglobus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpglobus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpglobus/)
 * [Active Topics](https://wordpress.org/support/plugin/wpglobus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpglobus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpglobus/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [marcAroma](https://wordpress.org/support/users/marcaroma/)
 * Last activity: [9 years, 12 months ago](https://wordpress.org/support/topic/wpglobus-custom-content-shortcode/#post-7464408)
 * Status: resolved