other shortcodes in Contact form 7 MAILS [closed]

WPCF7 incorporates more filters than used in the answer you already found. Analogously to that, the wpcf7_posted_data filter should do what you are looking for: function wpse73667_wpcf7_posted_data( $posted_data ) { $posted_data = do_shortcode( $posted_data ); return $posted_data; } add_filter( ‘wpcf7_posted_data’, ‘wpse73667_wpcf7_posted_data’ ); Note that this is an educated guess and untested. You can find all … Read more

How the widget can be run by shortcode

I think you are out of luck as wordpress core doesn’t have this kind of functionality. Quick googling shows that there are plugins to do that like this one http://wordpress.org/extend/plugins/amr-shortcode-any-widget/, but if you have programming skills you should probably write a shortcode handler with/instead of the widget.

Recent post display using shortcode

You have missed the quotes in the_permalink(). Use following code function my_recent_posts_shortcode($atts){ $q = new WP_Query( array( ‘orderby’ => ‘date’, ‘posts_per_page’ => ‘4’) ); $list =””; while($q->have_posts()) : $q->the_post(); echo ‘<div class=”item”>’; $title=get_the_title(); if ( has_post_thumbnail() ) { $list .= ‘<a class=”single-image link-icon” href=”‘. get_permalink().'”>’.the_post_thumbnail(array(300,200),array(‘alt’ =>$title)).'</a>’; } $list .= ‘<h6 class=”title”><a href=”.the_permalink().”><span>”‘.the_title().'”</span></a></h6>’; echo ‘<div class=”entry-body”>’; … Read more

Inserting PHP inside do_shortcode

This is the code I would use: $open_shortcode=”[vc_accordion]”; $shortcode_data=””; $close_shortcode=”[/vc_accordion]”; $myarray = array( ‘tabs’ => array( ‘title’ => ‘Section 1’, ‘content’ => ‘Any text here’ ), array( ‘title’ => ‘Section 2’, ‘content’ => ‘Any text here’ ) ); foreach( $myarray[‘tabs’] as $tab ){ $shortcode_data .= ‘[vc_accordion_tab title=”‘ . $tab[‘title’] . ‘”]’ . $tab[‘content’] . ‘[/vc_accordion_tab]’; … Read more

creating shortcode to pull json array

As per documentation on wp_remote_get() it doesn’t return you just the body of requested resource. Its return will be either the array of data or WP_Error object on failure. The simplest snippet to get to the body would be: $json = wp_remote_retrieve_body( wp_remote_get( $url ) ); PS it’s kinda weird to be doing this in … Read more