Snippets

WooCommerce Add to Cart with Ajax on Single Product Page

Ajax is fun. Most people prefer Ajax so that there is loading of pages involved and the user can see everything right in front of them without refreshing or redirecting to another page. I will explain you step by step how you can add a product from your single product page with Ajax in WooCommerce…. Read More

How to create Custom Taxonomies in WordPress

In the previous article here, I explained how to create a Custom Post Type. In this article I will show you how to create custom taxonomies in WordPress. What is a Custom Taxonomy? Taxonomies are a grouping mechanism for the post types in WordPress. For example, you group together categories of posts by creating categories,… Read More

Responsive 4 Column Layout

CSS snippet for a fluid responsive 4 column layout. 4 Column Layout with equal width content HTML CSS .col-four { width: 22%; float: left; margin-right: 4%; } .col-four:last-child { margin-right: 0; } .clear { clear: both; } Responsive CSS Tablet View @media screen and (max-width : 1024px) { .col-four { width: 50%; float: left; margin-right:… Read More

Responsive 3 Column Layout

CSS snippet for a fluid responsive 3 column layout. 1/3 + 1/3 + 1/3 1/2 + 1/4 + 1/4 1/4 + 1/2 + 1/4 1/4 + 1/4 + 1/2 1/3 + 1/3 + 1/3 responsive 3 column layout Three Column Layout with equal width content HTML CSS .col-one, .col-two, .col-three { width: 30%; float: left;… Read More

Responsive 2 Column Layout

CSS snippet for a fluid responsive 2 column layout. 1/2 + 1/2 responsive 2 column layout 2/3 + 1/3 responsive 2 column layout 1/3 + 2/3 responsive 2 column layout 3/4 + 1/4 responsive 2 column layout 1/4 + 3/4 responsive 2 column layout 1/2 + 1/2 Two Column Layout with equal width content HTML… Read More