Title: Visual Composer Shortcode
Last modified: August 24, 2016

---

# Visual Composer Shortcode

 *  Resolved [Funkateer](https://wordpress.org/support/users/funkateer/)
 * (@funkateer)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/visual-composer-shortcode/)
 * Hello rainbowgeek,
 * thanks for this great plugin in advance!
    Is there a way to include the shortcode
   in the Visual Composer Plugin? You can map a custom (your) short code inside 
   Visual Composer Settings, but it kills the last slash inside the code, that seems
   to be needed: `[wpc-weather id="4289"]` but it only works inside a “Unfiltered
   html code”-Container with: `[wpc-weather id="4289" /]`
 * Without the slash the loading spinner disappears as expected but nothing is displayed.
 * [https://wordpress.org/plugins/wp-cloudy/](https://wordpress.org/plugins/wp-cloudy/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Funkateer](https://wordpress.org/support/users/funkateer/)
 * (@funkateer)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/visual-composer-shortcode/#post-6153606)
 * I figured it out by myself. Instead of using the WP Cloudy Shortcode inside Visual
   Composer Plugin put the following code inside the functions.php of your theme:
 *     ```
       add_shortcode('pp_cloudy', 'wpc_field');
       function wpc_field($atts){
       	extract(shortcode_atts(array(
       		'id' => 1
       		), $atts)
       	);
   
       	$id = $atts['id'];
       	$weather = do_shortcode('[wpc-weather id="'.$id.'"]');
   
       	return $weather;
       }
       ```
   
 * and register the new shortcode inside Visual Composer Plugin:
 * `[pp_cloudy id="4290"]`
 * That´s it. Thanks anyways 😉

Viewing 1 replies (of 1 total)

The topic ‘Visual Composer Shortcode’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-cloudy_657583.svg)
 * [WP Cloudy](https://wordpress.org/plugins/wp-cloudy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-cloudy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-cloudy/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-cloudy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-cloudy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-cloudy/reviews/)

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)
 * [slash](https://wordpress.org/support/topic-tag/slash/)
 * [Visual Composer plugin](https://wordpress.org/support/topic-tag/visual-composer-plugin/)

 * 1 reply
 * 1 participant
 * Last reply from: [Funkateer](https://wordpress.org/support/users/funkateer/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/visual-composer-shortcode/#post-6153606)
 * Status: resolved