How to use Repeater field of advance custom field

Here you will find all you need to know. http://www.advancedcustomfields.com/resources/field-types/repeater/ One example <?php if(get_field(‘repeater_field_name’)): ?> <ul> <?php while(has_sub_field(‘repeater_field_name’)): ?> <li>sub_field_1 = <?php the_sub_field(‘sub_field_1’); ?>, sub_field_2 = <?php the_sub_field(‘sub_field_2’); ?>, etc</li> <?php endwhile; ?> </ul> <?php endif; ?>

Can’t pull metadata for a term in my theme’s function.php

woocommerce_add_to_cart_validation is a filter that is run in the add_to_cart_action method of the WC_Form_Handler class. This method is attached to the init hook. add_action( ‘init’, array( $this, ‘add_to_cart_action’ ) ); Your taxonomy is quite probably also registered at the init hook. The WooCommerce action has no priority set, so the default would be 10. I … Read more

Build and ajax plugin not work

You never enqueued the ajax_init in a function. Also you can use plugins_url() and split into two functions with a shortcode, like this: (not tested) <?php /* Plugin Name: Ajax Plugin Description: Plugin for adding ajax Version: 1.0 */ /*——————————————————-*/ /* Register Scripts /*——————————————————-*/ add_action( ‘wp_enqueue_scripts’, ‘ajaxp_init’ ); function ajaxp_init(){ /* * registro del script … Read more

Session alternative for plugins (due to caching)

A similar question popped at [wp-hackers] and apparently Eric Mann‘s plugin, WP Session Manager, is the way to go. I haven’t analyzed the plugin’s code, so cannot tell about its inner workings. Pippin Williamson embeds WPSM in his Easy Digital Downloads plugin. Given Pippin’s review and Eric being such a pro-old-timer-wp-ninja, I wouldn’t look no … Read more