How do I stop out of stock items from appearing on my WooCommerce site when using the Layered Nav widget [closed]

// Out of stock for general woocommerce – might help someone function product_in_stock($post, $product) { if (!$product->is_in_stock()) { $STOCK = TRUE; return $STOCK; } else { return false; } } function check_if_out_of_stock(){ global $post,$product; $stock = product_in_stock($post,$product); $output=”<div class=””; $output .= $stock?”instock”:”outofstock”; $output .= ‘”>’; echo $output; } add_action( ‘woocommerce_before_shop_loop_item’, ‘check_if_out_of_stock’); function close_out_of_stock(){ echo “</div>”; … Read more

Author Link in Recent Posts Widget

I think the rather simplistic approach would be: copy the whole WP_Widget_Categories from wp-includes/default-widgets.php, and paste it to your functions.php. In there, you could modify the output by customizing this part of the class: class WP_Widget_Recent_Posts extends WP_Widget { … <?php echo $before_widget; ?> <?php if ( $title ) echo $before_title . $title . $after_title; … Read more

Show or hide a widget from pages

Barring the discovery of a plugin that does this already (I’m not aware of any that specifically do what you want) you’ll need to create your own. add_meta_box and add_filter(‘widget_display_callback’, $instance, $widget, $args) should be the bulk of what you need

pre-upload text and video for the future

Unless I’m misunderstanding you, you should just need to set the publication date of the post in the future and “Publish” it. This should walk you through you what you need to know: http://wordpress.tv/2009/01/14/publishing-your-post-at-a-later-date/

WordPress Hide Widget If $_Session Is Active?

The easiest way to do this is via dynamic_sidebar() <?php if ($a == $b) // Your $_SESSION stuff dynamic_sidebar( ‘Right Sidebar’ ); ?> Any widgets contained in the “Right Sidebar” will now be loaded based on your condition. You should use this with register_sidebar() http://codex.wordpress.org/Function_Reference/dynamic_sidebar