News & Blog

Get Image Alt, Caption, Description and More From Attachment ID in WordPress

December 1st, 2015 - Posted by Steve Marks to PHP, Web Development.
Whilst working on a WordPress site recently I had a scenario where I had an image attachment ID and needed to get the alt, plus other information, about the image. Oddly, I found it very difficult to obtain this information. There are lots of functions available in WordPress to get the ima...

Remove Whitespace Between List Items Generated By wp_nav_menu()

September 26th, 2014 - Posted by Steve Marks to (X)HTML / CSS, PHP, Web Development.
Earlier today I was using wp_nav_menu() function within WordPress to output a navigation menu on a site. I was getting an issue however whereby the whitespace between the list items (<li>) was causing spaces between the menu items on the frontend. My list items had the ‘display...

Why a Custom Taxonomy Might Not Be Returned in WordPress

July 14th, 2014 - Posted by Steve Marks to PHP, Software, Web Development.
When creating a plugin or theme in WordPress there might come a time when you need to use custom taxonomies. As well as creating the taxonomies in the first place, you might need to work with them in some other way too; be this outputting them in a list, or programmatically assign a post t...

Debugging Why Your Comment Reply Links Aren’t Showing in WordPress

June 18th, 2014 - Posted by Steve Marks to PHP, Web Development.
Comments are a great addition to any blog powered by WordPress. Not only do they influence interaction between your users, but they can also be beneficial when it comes to SEO. With WordPress’ built in capabilities to handle comments, adding them to any blog post or news article is r...

Update Published Date When Going From Draft to Published in WordPress

April 10th, 2014 - Posted by Steve Marks to PHP, Web Development.
The published date of a page or post in WordPress is set when the article is first added to a website. This is then used in various scenarios; ordering news articles in date order, displaying when a blog post was first added, or setting the ‘pubDate’ value in an RSS feed. An is...
Debugging Ajax Requests

Debugging Why Your AJAX Requests Aren’t Working

February 18th, 2014 - Posted by Steve Marks to Javascript / jQuery, Software, Web Development.
AJAX is a great way to improve usability for a site or application and, with the up-rise of libraries such as jQuery, MooTools and Prototype, it’s never been easier to implement AJAX functionality. When it’s working it can make tasks quicker to complete, and also means that the...
Overwrite Modern Tribe Event Plugin Labels

Overwrite English Labels in Modern Tribe Events Calendar Plugin

January 29th, 2014 - Posted by Steve Marks to PHP, Web Development.
I recently installed and setup the Event Calendar plugin from Modern Tribe on a WordPress site. It worked great out of the box and was so easy to customize through use of the templating system that it comes with. I could get it looking exactly how the client wanted, with the exception of a...

MySQL CONCAT() Returning NULL Even Though Values Exist

January 24th, 2014 - Posted by Steve Marks to MySQL, Web Development.
The MySQL CONCAT() function is used to concatenate two or more columns or strings together. I had a scenario earlier today where, when concatenating a few columns together the outcome would always be NULL. An example of this query was as follows where I was concatenating a series of addres...

jQuery fadeOut() Not Working on Absolute Positioned Elements

September 18th, 2013 - Posted by Steve Marks to Javascript / jQuery, Web Development.
I’ve been using jQuery for a few years now and, in this time, must have done thousands upon thousands of hiding and showing elements by using the fadeIn() and fadeOut() functions. Back in the day, hiding and showing elements was commonly done by switching the ‘display‘ st...

PHP’s ftp_nlist() Returning False, Even When Files Definitely Exist

July 17th, 2013 - Posted by Steve Marks to PHP, Web Development.
PHP comes with a whole host of FTP functions built-in that makes performing FTP operations quick and easy. One of the things you can do is to use the ftp_nlist() function to get the contents of an entire directory. This is exactly what I was doing today and went something along the lines o...