How to use JavaScript Module Pattern inside WordPress

Since I discovered that it is better to avoid to put everything in your global scope with JavaScript I love to use the Module Pattern. (Mastering The Module Pattern of Todd Motto is a very good article about it) But I build a lot of WordPress websites. At the first time I started the create a cool slider for 1 of my clients with the Module Pattern, it was not easy to let WordPress change options like the autoplay, slide effect or the animation speed.

Building Responsive Table with only CSS

Are you working a lot with Responsive websites? And hate those table’s in form example Woocommerce? Try this snippet to make your table Responsive with only CSS! WordPress Responsive Body classes For my Responsive WordPress website’s i use also an (half) self developed WordPress plugin named “WP Mobile Detect” to check if the website is loaded on an computer, smartphone or tablet. And if it is an tablet to check what kind of OS it has.

Bestsellers Woocommerce product loop

Wondering how you can make an loop with only the bestsellers of your products for you Woocommerce website? It’s pretty simple! Just make a normal loop and make use of the pre-defined meta-key “total_sales” an order by the value. The code <?php $args = array( 'post_type' => 'product', 'posts_per_page' => 4, 'meta_key' => 'total_sales', 'orderby' => 'meta_value_num', ); $loop = new WP_Query( $args ); if ( $loop->have_posts() ) { while ( $loop->have_posts() ) : $loop->the_post(); woocommerce_get_template_part( 'content', 'product' ); endwhile; } else { echo __( 'No products found' ); } wp_reset_postdata(); ?

Display comments on Custom Post Type page by Genesis Framework

So i’m building an custom plugin for one of my clients. I’m using an Custom Post Type, an visitors must be capable to add comments. Normally you will use this function : comments_template();. But because this theme is build with the Genesis Framework it doesn’t work. But to you to save a search this is the function you need to get it done! genesis_get_comments_template(); So spread the Word and share!

Custom Woocommerce email notification for dealer or supplier

Since a couple of days i was searching of a solution to make my own custom email notification for Woocommerce. And especially to send an dealer or supplier an email that he have got an order to handle. But Woocommerce has a documentation. But custom stuff like this you wouldn’t find there. So i started myself! And came with an solution. For my locations i use the WordPress plugin SimpleMap, it’s a nice plugin to create dealer location libary where visitors can search if there near by an dealer.
1 of 4 Next Page