If you’ve ever needed to display featured products through a custom loop in WooCommerce on one of your custom template pages, this snippet of code is what I’ve been using for WooCommerce 3 and above. You’ll need to wrap this in a list element possibly with a class of “products” depending on your css. <?php… Continue Reading +
Posts Tagged: coding
CSS is not easy
Technically this isn’t much of a blog post, but I saw a great quote by Jeremy Keith on the subject of CSS simplicity and wanted to share it as it mirrors most of my own feelings on the subject. Unlike a programming language that requires knowledge of loops, variables, and other concepts, CSS is pretty easy… Continue Reading +
CSS Tip – Selecting the last (odd numbered) item in a list of varying length
I’ve always found list items ‹li› pretty easy to work with, but recently I had an issue where I needed to target the last item in the list, but only if it was an odd number. Pretty easy if the number of list items is fixed, but more of a challenge if the number can… Continue Reading +
Vertical dividers on horizontal List
I’ve lost count of the amount of times I’ve had to create a horizontal navigation menu with vertical dividers between the list items. The ones where the end result should look something like this: Item 1 | Item 2 | Item 3 | Item 4 | Item 5 I’ve tried many different ways of achieving… Continue Reading +
Adding a share link to Facebook without using JavaScript
Recently I had to add a Facebook sharing link into a webpage where Javascript was not available, and I wasn’t sure if it was possible. After some researching I discovered that it was indeed possible if all you need is the basic functionality, and really, why would you want to overcomplicate things? The following method… Continue Reading +
Solving an issue involving Grunt and the Sass cache
I’ve recently been trying out Grunt instead of the tried and trusted CodeKit as there’s a few things I really like about it, one of which is how customisable it is. I set Grunt us to watch my Sass/Scss files and compile whenever I saved them. Sadly, one issue I was struggling with was a… Continue Reading +
Sublime Text 3 – wrapping selection in tag shortcut
As a front-end web developer, something I seem to end up doing a lot of times is wrapping individual lines, or wrapping a section of code with HTML tags. For example, I might have received a text document from a client with copy for their website and I need to wrap the supplied content in… Continue Reading +
Setting a fallback on Links
When I was writing one of my previous entries about my experience of the InSites tour, I made the word “InSites” link to the lovely website that was used to promote the tour and sell the tickets. There is obvious advantages to doing this, as it makes it easy for readers to check out what… Continue Reading +