• Resolved Funkateer

    (@funkateer)


    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://www.ads-software.com/plugins/wp-cloudy/

Viewing 1 replies (of 1 total)
  • Thread Starter Funkateer

    (@funkateer)

    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.