Archive for the ‘Web Design’ Category
file_get_contents : An Alternative to cURL
In my post about cURL the other day Matt mentioned that file_get_contents is a simpler method to use, and in many ways he's right.
file_get_contents is a PHP functions that gets the contents of a file. Unlike cURL it doesn't require any configuration so you can simply call it as so:
$data = file_get_contents('http://url_to/get_contents/from');There are some disadvantages, a big one being that some webhosts block the function, but for really quick data retrieval this function is perfect.
Using file_get_contents the ...
How to Integrate Twitters @Anywhere with your WordPress Comments
Last week Twitter released @Anywhere, a system for more easily integrating Twitters features into your website. I'm a bit of a fan of Twitter so decided I wanted to add it to Binary Moon, and on Saturday I released the first version.
The first place I saw this functionality was on Webmaster Source, so I asked Matt if he would share his code with me - and very kindly he said yes. I then integrated the functionality into my ...
How to Add Widgets to your WordPress Themes
Adding widgets to a WordPress theme is a fantastic way to make things really easy to customise for the people who use the theme. Below is a really quick explanation of how to add them to your own themes.
Creating widget areas is actually really simple - there are only two steps in the process. The first is initializing the widget area, and the second is inserting the widgets into your ...
Just Added Twitters @Anywhere to Binary Moon
Thanks to some pointers from Matt at Webmaster Source I now have Twitter @Anywhere functionality on Binary Moon.
If you post a comment you can include your Twitter username in the comment, and it will then be added to your comment. I suspect I will change how this is laid out/ designed in the future but it all works perfectly as it is. The functionality is actually built into my WordPress theme,
How to Build the Perfect WordPress Sitemap
I was recently asked how I built the sitemap on Binary Moon so I thought I would share the code. The sitemap layout is actually one of the many custom page templates available in my WordPress theme, Elemental - however the code is very loosly based upon that in the original SRG Clean Archives plugin (before it was taken over by Geek With a Laptop).
Sitemaps are a single ...
Using cURL to Read the Contents of a Web Page
Recently I wrote about how to use the Yahoo! weather api with WordPress and in the comments I was asked how to use it without relying on WordPress. The answer - is cURL.
According to Wikipedia the name cURL comes from "Client for URLs" and it is essentially a command line interface for a web client. This means that you can access web content through a script on your site. This is most often used by websites when they access ...
WordPress Caching, Part 1: The Basics
Caching (on the internet) is the act of storing computationally expensive calculations in a way that can be recovered very quickly with the smallest possible impact on the server.
Or, in short, 'speeding stuff up'.
In this series of posts I will be showing you how you can speed up your WordPress blog. I'll start with the basics and then move on to how I cache external data in my WordPress theme - Elemental.
10 WordPress query_posts tips you probably don’t know
I have written a really brief query_post tutorial before, and it did quite well, but both WordPress and my own skills, have advanced considerably since then. So I thought it would be interesting to revisit the query_posts command and see what has changed.
The query_posts command is one of the most useful in all of WordPress. It is this command that allows all the content to be queried (extracted ...