Blog

We are always up to something. Feel curious? Get the latest insights here...
Jan 0
Jan 0

[WordPress] Remove p and br tags from wordpress shortcodes

Simply copy and paste the following code into your functions.php file or wherever your hold your shortcodes. This function will clean up the output of your shortcodes, which is especially important for nested shortcodes.

  Read more
Jan 1
Jan 1

[WordPress] Responsive video embeds without plugins

Although WordPress does make the process of embedding Youtube (among others) videos easy, it does not add a div around embed codes by default, so this is an essential step into making the video embeds responsive. Use the code below to add a wrapping div around each embedded video and also add the required CSS […]

  Read more
Nov 0
Nov 0

[WooCommerce] Add video as featured image for products

Using the code below, you can add a video that will replace your featured image for the given product. If video is not found, the featured image is displayed instead. Place this code in your functions.php file and note that you may have to edit the function that displays the video to match your theme. […]

  Read more
Oct 0
Oct 0

[WordPress] Group Custom Post Types in a Top Level WordPress Menu

There are many times when you’re working on a custom WordPress website that you  find yourself having to create several custom post types to improve the clients user experience. In most cases you find that some of these post types would make sense being grouped together under a single menu item. Not only does this […]

  Read more
Sep 0
Sep 0

[Magento] Custom admin theme

As mentioned on Magento forums the easiest way to achieve this is with overriding adminhtml config with your local custom one and activate it as module. This is just a small example of different approach with Admin Theme config option in admin panel, to show you how things can be done in different ways in […]

  Read more
Sep 0
Sep 0

[WordPress] Make featured image required

This is a great idea if you have clients who are creating their own posts. After you spend time devising an attractive template layout, clients often decide to skip the featured image, ruining the flow and presentation of what you’ve created. This snippet will require the author to select a featured image before the post […]

  Read more
Sep 0
Sep 0

[WooCommerce] Add a surcharge to your cart / checkout

You can use the following snippet to add a 1% surcharge to your cart on checkout. You can easily change the $percentage variable to adjust the surcharge percent and you are good to go.

  Read more
Sep 0
Sep 0

[Woocommerce] Dynamically add/remove products from cart

Ever needed to dynamically add/remove products to a visitor’s cart based on their cart contents? The below functions will help you do just that. Place them in the functions.php of your theme or (better) in a separate plugin and you are all set. Just make sure to modify the qualifies_for_incentive function to work based on […]

  Read more
Aug 0
Aug 0

[WordPress] Remove version numbers from static resources

If you’ve been working with WordPress for a while, I’ll bet you’ve noticed the query string attached to each .js and .css file loaded by your site. (For those not familiar with query strings, they are all the jargon appended to your files when enqueued, for example &ver=1.1 or something siliar.) This happens because whenever […]

  Read more
Aug 0
Aug 0

Add Defer and Async Attributes to Render Blocking Javascript in WordPress

Depending on the script and what it does, you might want to defer them or load them asynchronously. Defered scripts are executed only after a page has finished loading completely, so if your script needs to be executed during page loads, an async attribute would be more appropriate. Keeping this in mind, the function below […]

  Read more