shortcode

Embedding Google Apps Script WebApp in WordPress Page

最后都变了- 提交于 2019-12-01 11:21:22
问题 I've done a great deal of research on how to workaround Wordpress's iframe restrictions and I've been able to get it to work using various plugins with common services (google maps, youtube, etc.). However, all of these methods have not worked for embedding one of my published webApps. My most recent efforts have been using this plugin. Here is an extremely simple 'Hello World' webApp that I would like to embed: LINK. I was unable to simply use that URL as the 'src' for the iframe so I

Wordpress Contact form 7 custom shortcodes

爱⌒轻易说出口 提交于 2019-11-30 09:04:22
Contact form 7 has some shortcodes, like [_date] to get todays date. But I want to display the date one week from now. So I need to create a custom shortcode to Contact form 7 that takes say [next_week] and in the recived email the correct date is displayed. Where and how do I create custom shortcodes to Contact form 7? Add the following to your functions.php wpcf7_add_shortcode('custom_date', 'wpcf7_custom_date_shortcode_handler', true); function wpcf7_custom_date_shortcode_handler($tag) { if (!is_array($tag)) return ''; $name = $tag['name']; if (empty($name)) return ''; $next_week = date('Y

Wordpress Contact form 7 custom shortcodes

帅比萌擦擦* 提交于 2019-11-29 12:25:54
问题 Contact form 7 has some shortcodes, like [_date] to get todays date. But I want to display the date one week from now. So I need to create a custom shortcode to Contact form 7 that takes say [next_week] and in the recived email the correct date is displayed. Where and how do I create custom shortcodes to Contact form 7? 回答1: Add the following to your functions.php wpcf7_add_shortcode('custom_date', 'wpcf7_custom_date_shortcode_handler', true); function wpcf7_custom_date_shortcode_handler($tag

Change Shortcode wrapper in Woocommerce

南笙酒味 提交于 2019-11-29 08:14:37
I'm using Wordpress 3.8 + Woocommerce 2.0 I need to change the class of the wrapper that Woocommerce generate when I use a shortcode. I use this shortcode: [recent_products per_page="12"] And the output is: <div class="woocommerce"> the_product_loop.... </div> I want to obtain <div class="MYCUSTOMCLASS"> the_product_loop.... </div> But I can't find where I have to change the code... In class-wc-shortcodes.php file I've found the declaration of the function that generates the wrapper: public static function shortcode_wrapper( $function, $atts = array(), $wrapper = array( 'class' => 'woocommerce

Regex extract variables from [shortcode]

这一生的挚爱 提交于 2019-11-29 08:05:29
After migrating some content from WordPress to Drupal, I've got som shortcodes that I need to convert: String content: Irrelevant tekst... [sublimevideo class="sublime" poster="http://video.host.com/_previews/600x450/sbx-60025-00-da-ANA.png" src1="http://video.host.com/_video/H.264/LO/sbx-60025-00-da-ANA.m4v" src2="(hd) http://video.host.com/_video/H.264/HI/sbx-60025-00-da-ANA.m4v " width="560" height="315"] ..more irrelevant text. I need to find all variables within the shortcode [sublimevideo ...] and turn it into an array: Array ( class => "sublime" poster => "http://video.host.com/

in woocommerce, is there a shortcode/page to view all orders?

余生长醉 提交于 2019-11-28 03:45:55
问题 I'm using the plugin woocommerce for my wordpress site, and need a section where member can see their order history. Are there any shortcodes or page in woocommerce that shows the order history of a member? 回答1: My Account shortcode: [woocommerce_my_account order_count="-1"] Shows the ‘my account’ section where the customer can view past orders and update their information. You can specify the number or order to show, it’s set by default to 15 (use -1 to display all orders .) Reference:

Change Shortcode wrapper in Woocommerce

北战南征 提交于 2019-11-28 01:50:02
问题 I'm using Wordpress 3.8 + Woocommerce 2.0 I need to change the class of the wrapper that Woocommerce generate when I use a shortcode. I use this shortcode: [recent_products per_page="12"] And the output is: <div class="woocommerce"> the_product_loop.... </div> I want to obtain <div class="MYCUSTOMCLASS"> the_product_loop.... </div> But I can't find where I have to change the code... In class-wc-shortcodes.php file I've found the declaration of the function that generates the wrapper: public

How to Use AJAX in a WordPress Shortcode?

主宰稳场 提交于 2019-11-25 22:48:42
问题 I have a code to display a random quote. One person wrote a function to implement all of this. But the update data via AJAX for some reason does not work. When you press the button \"New Quote\", nothing happens. Maybe someone knows why? What needs to be fixed in the following code, so that when you click \"New quote\" a new quote is loaded? The PHP /wp-content/themes/%your_theme%/js/ajax-load-quote.php <?php /* uncomment the below, if you want to use native WP functions in this file */ //