File_Exists For Remote URL

If you want to make sure that a file exists in PHP you can use the function file_exists(), which takes one parameter of the filename. This function will not only work for files but will also work for directories, you can pass in a filename of the directory and if this directory exists the file_exists() function will return true. The problem I've seen with this function is that people have

Read more...

Getting Started With SASS

If you do any front-end development over the past couple of years then you would of heard of CSS pre-processors. The most common CSS pre-processors are SASS, LESS, or Stylus. CSS pre-processors are scripts that will compile code and output the results into CSS stylesheets. They allow you to create more dynamic, optimized and organised CSS for your websites. In this article I am going to investigate what it is

Read more...

Sticky Posts In WordPress

As of WordPress version 2.7 you've been able to assign some posts to be sticky, a sticky post will make sure that this post appears at the top of the list of posts. If you use your WordPress site as a normal blog and have a list of posts of the homepage of your site, making a post sticky will ensure that this post appears at the top of the

Read more...

Update Row With Highest ID In MySQL

Recently needed to update the last inserted row of a table but didn't have anyway in knowing what the highest ID in the table was. I can easily do this by using the max() function to select the highest ID in the table. Then I can use the result of this query in the UPDATE query to edit the record with the highest ID. But this is quite a easy

Read more...

Share Multisite Media Libraries

When you use WordPress multisite functionality you are creating a brand new site for each site in the network. This means that they will use different content, different menus and different widgets. They can re-use the same plugins and themes as each other but they are treated as completely different sites. While doing client work with WordPress multisite I've noticed that most sites want to kept separate but because they

Read more...

Redirect Users After Login In WordPress

WordPress comes with the ability to create different users for your website. Each of these users can have different roles and different capabilities to perform tasks on your website. You can have users which are allowed full control over everything on your site, install plugins, install theme, edit posts, upload media, everything. At the other end you can have users that are only allowed to view the posts on your

Read more...

Equal Height Columns

If you are displaying a number of columns on your web page then would of probably reached the problem where you need these columns to be the same height as each other. The problem you have with these is when you have different content in the columns some will be larger than others, which will break the design of the website. When you start adding content to these boxes they

Read more...

Add Custom User Profile Fields In WordPress

When you are working on projects that need a lot of user management then you can get to the point where you need to add additional information to the users of your website. This is similar to creating new post meta data where you are able to create new bits of data and attach them to your posts, the users can work in exactly the same way. In the WordPress

Read more...

Free Files For April 2014

Each month the Envato marketplace brings you free premium files. Envato is a web marketplace where you can get premium files for different areas of your website. My favourite marketplaces are the script marketplace CodeCanyon and the theme marketplace ThemeForest. Here are the files which you can get for free for April 2014. PHP Radio Stations Database 20 purchases at the price of $14. PHP Radio Stations Database is a

Read more...

Password Protected Pages Excerpt

When you display list posts in WordPress and want to display a snippet of the post content, there are two ways you can do this. You can either use the the_excerpt() function which will return the first 55 words of the post, excluding all shortcodes and images. The other option is to use the the_content() function with the more comment to tell WordPress to break at this point. The more

Read more...

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 70