Archive dropdown styling not applied

You’re targeting cd-dropdown with a class indicator (the period), the cd-dropdown is an ID and should therefore be targeted with the ID selector (a hashtag). #cd-dropdown > span, #cd-dropdown ul li:nth-last-child(-n+3) span { box-shadow: 0 1px 1px rgba(0,0,0,0.1); }

What is the Javascript event for an item being added to the cart in Woocommerce?

Read the source. From woocommerce-ajax.php (in the plugin’s root folder) Javascript/Ajax add to cart /** * AJAX add to cart * * @access public * @return void */ function woocommerce_ajax_add_to_cart() { global $woocommerce; check_ajax_referer( ‘add-to-cart’, ‘security’ ); $product_id = (int) apply_filters(‘woocommerce_add_to_cart_product_id’, $_POST[‘product_id’]); $passed_validation = apply_filters(‘woocommerce_add_to_cart_validation’, true, $product_id, 1); if ($passed_validation && $woocommerce->cart->add_to_cart($product_id, 1)) : // … Read more

update_option in javascript

JavaScript $(window).scroll(function () { if ($(window).scrollTop() >= $(document).height() – $(window).height() – 10) { /***update options***/ $.ajax({ type: ‘POST’, url: ‘http://www.example.com/wp-admin/admin-ajax.php’, data: { action : ‘hit-bottom’, option : $option, // your option variable new_value : $new_value // your new value variable }, dataType: ‘json’ }).done(function( json ) { alert( “Ajax call succeeded, let’s see what the … Read more

Logout user and delete cookies from the client side?

You should be able to combine the solutions in these answers to achieve what you are looking for. Keep checking and if the internet connection drops, clear the cookies. https://stackoverflow.com/questions/10426851/quickest-way-to-check-internet-connectivity-in-js https://stackoverflow.com/questions/179355/clearing-all-cookies-with-javascript

Listbox return wrong value in WordPress 3.9

Well after long research I find out solution, var menuval=[]; var insertVar = function (val) { return function () { editor.insertContent(val); } }; for (var i = 0; i < SHORTCODES.length; i++) { var _id = SHORTCODES[i]; var _code = SHORTCODE_EXE[i]; var variable = insertVar(_code); //alert(_id+’ ‘+ SHORTCODES[i]+’ ‘+SHORTCODE_EXE[i]); menuval.push({text: _id, onclick: variable }); }

Click loads template via ajax

So, you’re using wp_localize_script to inject the ajax url. But you didn’t use the localized var handle to access that value. Try this: /* … */ $.ajax({ url: ajaxStuff.ajaxurl, // NOTE use of ‘ajaxStuff’ object /* … */

Run a Parallel PHP Application with WordPress

You can use the WP REST API plugin to add/manipulate/present media of a WordPress install from within your app. The page creation part I am not sure of, perhaps it’ll need to be done manually – or you can create pages via the /pages/ endpoint. I’ll let someone correct me if I’m wrong, but the … Read more