News & Shit

PHP

X Theme & Pro Theme

Enabling AJAX Add to Cart on single product views, with X overlay

One simple tweak I make on many of my Woocommerce based websites is to enable the AJAX add to cart functionality. In many cases, having the user directed to a cart page isn’t ideal for your shop, and a hard reload to the same page is just silly. Someone in the Themeco community asked about how to do this, so I’m sharing the code I use.

X Theme & Pro Theme

Override the Pro Theme header assignment for specific pages and conditions

Themeco’s Pro Header Builder is pretty amazing. But what do you do when the specific page you’d like to target isn’t available as an assignment? How about when you want to show a specific header for logged in users? Or for different user roles? This little PHP snippet will do just that.

X Theme & Pro Theme

Add the Excerpt to Recent Posts

The Recent Posts element in Cornerstone are admittedly lean, but one simple change you can make is to add the post excerpt to them.