Display sorting options dropdown when using WooCommerce product category shortcode

Since WooCommerce 3.2, Woocommerce shortcodes and their available attributes have changed. So try the following shortcode instead (for “foo” product category): [product_category limit=”90″ columns=”3″ category=”foo” paginate=”true”] or inside php code: echo do_shortcode( ‘[product_category limit=”90″ columns=”3″ category=”foo” paginate=”true”]’ ); Now you will see that the sorting options dropdown appear. Note: orderby argument with an empty value … Read more

Extract the first oembed url inserted on the content of a post

I assume that you’re only interested in the first URL that actually succeeds at discovering actual oembed data. The oembed system processes all links it finds, but not every link will have oembed going for it, obviously. The filter you’ll want to use is embed_oembed_html and it gets the HTML cached by oembed, the url, … Read more

Debugging an error: wp_enqueue_style was called incorrectly

In other words, you should not perform a wp_enqueue_style which is not hooked to wp_enqueue_scripts. Your wp_enqueue_style should be in a function, and you should hook that function to wp_enqueue_scripts like in the following example: function wpse88755_enqueue(){ # call wp_enqueue_style here } #hook the function to wp_enqueue_scripts add_action( ‘wp_enqueue_scripts’, ‘wpse88755_enqueue’ );

Is it possible to get a theme customizer setting from wp.customize using jquery?

Not sure what you try to accomplish, but you can get a value by key using the wp.customize object: wp.customize.value(‘show_on_front’)(); wp.customize.value(‘blogname’)(); …. sorry no jQuery here, just javascript, and yes, the extra () are intentional. Edit: Full overview of all settings: wp.customize._value; console.log(wp.customize._value); Edit II: different approach: a) lookup all available settings by using console.log(wp.customize._value); … Read more