do_shortcode close

Use get_field instead of the_field. That way you can assign it to a varilable. $first_comment = get_field(‘first_content_block’); $second_comment = get_field(‘second_content_block’); echo do_shortcode(“[vr_jsp] $first_comment, $second_comment [/vr_jsp]”); I haven’t tried it, but see if that works.

Form Plugin for Api Requests which is used via Shortcode

First, create a function to process the form. In the shortcode function, first process the form and then return any form/message that you want to display to the user. /** * Plugin Name: NewsletterFormConnector * Description: Newsletter Form to connect to Newsletter Api * Author: emjay * Version: 1.0 */ //Add function file require_once(plugin_dir_path(__FILE__) . … Read more

Executing Javascript in Plugin

Based on what I can see, it looks like your calling the create_map function incorrectly. add_shortcode() takes 2 parameters, the name of the shortcode and the function that gets rendered when called. The array you are passing is how to call a method inside of a class. You’re basically saying call the create_map method from … Read more

Create special button on WP Tiny MCE Posts Editor for Shortcodes

Your functions have nothing to do with each other. Is all you want a button that when clicked adds [tooltips class=”top_tooltip” title=”Your Tooltip here”] Text here [/tooltip] to the editor? — This is currently what your doing — First Function: function tooltip( $button ) is adding your tooltip shortcode Second Function: mce_tooltip( $button ) is … Read more

Which wordpress function is the caption shortcode linked to?

You should try this on a default theme (without any plugins), to see if that makes any difference. Your shortcode example: gives this output: <div id=”my-caption-id” style=”width: 409px” class=”wp-caption alignnone my-caption-class”> <img src=”https://wordpress.stackexchange.com/questions/158628/whatever.jpg” alt=”whatever” width=”399″ height=”600″> <p class=”wp-caption-text”>My caption text</p> </div> on the Twenty Twelve theme. It’s just a little bit formatted to make it … Read more

echo do_shortcode for Contact Form 7 from within dynamically loaded php file

From what you have shown, downloadform.php never loads WordPress, hence naturally do_shortcode() is not available. You need to implement your AJAX using this Codex article: http://codex.wordpress.org/AJAX_in_Plugins Another alternative I would suggest is loading the contact form in a hidden div during the initial page load and then display the hidden div when users click whatever … Read more

Add variable in between do_shortcode

I would rather pass the variable to the id attribute inside the shortcode. You can even decide to remove the id attribute inside the shortcode and make it a static value that you pass to your custom query For examples and more info about how shortcodes operate, check out the Shortcode API