How to remove categories from your wordpress RSS feed
Monthly Archives: February 2012
5 Mobile Phone High Quality Layered PSD Collection
Determining Which Plugins Are Slowing Your Site Down
WordPress is an incredibly useful content management system that is in use on thousands of websites word wide and with the large number of plugins available it is a good choice for anyone thinking about creating a website however, installing allot of plugins can cause the site to become slow and unresponsive but the problem is likely to only be with 1 -2 of the plugins. This tool is a must as it lets you scan your website and highlight which plugins are taking the longest to load so you can disable them and find alternatives
Determining Which Plugins Are Slowing Your Site Down.
Blog post by Alex Wells
Working as a Website developer I love nothing more then working waist deep in code, I have specific interests in PHP and WordPress development but mostly working with local businesses to provide them with a website that meets their needs. Contact me if you have a project in mind and would like to get an input from an experienced website developer.
Basic Pagination with PHP and MySQL
A useful article on PHP and MySQL Pagination, very simple and easy to edit code that lets you split data output onto several pages.

As a web developer, you will often be tasked to display large amounts of data to the user in some kind of easy to read format. Let’s say for instance you have a list of employees in your database, and you want to be able to list them on your web page. If you only have a dozen or so employees, it’s no big deal to just make a simple loop and display them all on the same page, right? Well what happens when you have 50 employees? 100? 1,000? Suddenly listing all of them on the same page doesn’t sound so hot.
Source: http://www.phpfreaks.com/tutorial/basic-pagination
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
<pre><?php
// database connection info
$conn = mysql_connect('localhost','dbusername','dbpass') or trigger_error("SQL", E_USER_ERROR);
$db = mysql_select_db('dbname',$conn) or trigger_error("SQL", E_USER_ERROR);
// find out how many rows are in the table
$sql = "SELECT COUNT(*) FROM numbers";
$result = mysql_query($sql, $conn) or trigger_error("SQL", E_USER_ERROR);
$r = mysql_fetch_row($result);
$numrows = $r[0];
// number of rows to show per page
$rowsperpage = 10;
// find out total pages
$totalpages = ceil($numrows / $rowsperpage);
// get the current page or set a default
if (isset($_GET['currentpage']) && is_numeric($_GET['currentpage'])) {
// cast var as int
$currentpage = (int) $_GET['currentpage'];
} else {
// default page num
$currentpage = 1;
} // end if
// if current page is greater than total pages...
if ($currentpage > $totalpages) {
// set current page to last page
$currentpage = $totalpages;
} // end if
// if current page is less than first page...
if ($currentpage < 1) {
// set current page to first page
$currentpage = 1;
} // end if
// the offset of the list, based on current page
$offset = ($currentpage - 1) * $rowsperpage;
// get the info from the db
$sql = "SELECT id, number FROM numbers LIMIT $offset, $rowsperpage";
$result = mysql_query($sql, $conn) or trigger_error("SQL", E_USER_ERROR);
// while there are rows to be fetched...
while ($list = mysql_fetch_assoc($result)) {
// echo data
echo $list['id'] . " : " . $list['number'] . "<br />";
} // end while
/****** build the pagination links ******/
// range of num links to show
$range = 3;
// if not on page 1, don't show back links
if ($currentpage > 1) {
// show << link to go back to page 1
echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=1'><<</a> ";
// get previous page num
$prevpage = $currentpage - 1;
// show < link to go back to 1 page
echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$prevpage'><</a> ";
} // end if
// loop to show links to range of pages around current page
for ($x = ($currentpage - $range); $x < (($currentpage + $range) + 1); $x++) {
// if it's a valid page number...
if (($x > 0) && ($x <= $totalpages)) {
// if we're on current page...
if ($x == $currentpage) {
// 'highlight' it but don't make a link
echo " [<b>$x</b>] ";
// if not current page...
} else {
// make it a link
echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$x'>$x</a> ";
} // end else
} // end if
} // end for
// if not on last page, show forward and last page links
if ($currentpage != $totalpages) {
// get next page
$nextpage = $currentpage + 1;
// echo forward link for next page
echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$nextpage'>></a> ";
// echo forward link for lastpage
echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$totalpages'>>></a> ";
} // end if
/****** end build pagination links ******/
?>
|
Blog post by Alex Wells
Working as a Website developer I love nothing more then working waist deep in code, I have specific interests in PHP and WordPress development but mostly working with local businesses to provide them with a website that meets their needs. Contact me if you have a project in mind and would like to get an input from an experienced website developer.
Changing your domain name – interesting article
This is an interesting article for those considering changing their domain name, a simple change from nutsonline to nuts caused a drastic reduction in traffic from Google – the author puts it down to 2 main points the first is the old domain had more value because it had been around for longer and the second is the new domain name had previously been black marked for spam.
Some points to remember when considering a domain name change!
You Don’t Have To Be Nuts To Worry About Changing Your Domain by Jonah Stein
Blog post by Alex Wells
Working as a Website developer I love nothing more then working waist deep in code, I have specific interests in PHP and WordPress development but mostly working with local businesses to provide them with a website that meets their needs. Contact me if you have a project in mind and would like to get an input from an experienced website developer.
Dropbox – save your files in the cloud for free!
In this post i will be looking at using Dropbox a free on-line cloud storage service that has a wide range of uses from backing up important documents to transferring files into your iPhone.
The first thing we will need to do is sign up for a Dropbox account here (use this link for extra free space!)
with an account created we can then install the software on our computer which is available here for both Windows and Mac
During the instal you will be asked for a location you want Dropbox to use as its ‘home’ folder – if you don’t select one it will be in My Documents.
Now the software has been installed and the folder set up anything you place in this folder will then be copied onto the Dropbox servers, if you update any of the files they will also be updated on the server.
So whats the benefit of all this? the most useful feature for most people is anything placed in this folder is now automatically backed up online so if anything happens to your computer you know your files are safe ans secure. Other uses for this service is using files across several computers, if you set up the software on 2 or more computers using the same Dropbox account anything added or updated on one computer will be automatically updated on all of the other computers as well.
To transfer files into your mobile device first place the files into the Dropbox folder on a computer, then install the Dropbox app on your mobile device after inputting your account details you will be able to view all of the files that are currently stored on your Dropbox account.
if you find any other good uses for Dropbox let me know in the comments
Blog post by Alex Wells
Working as a Website developer I love nothing more then working waist deep in code, I have specific interests in PHP and WordPress development but mostly working with local businesses to provide them with a website that meets their needs. Contact me if you have a project in mind and would like to get an input from an experienced website developer.
How to add twitter to your website
In this post i will look at adding a twitter feed to your website, this is a useful way of showing visitors on your site that you have a twitter account and some examples of what you tweet about so they are more likely to follow you – my twitter feed is on the right hand side if you fancy following me *hint hint*
To get started you will need to visit: https://twitter.com/about/resources/widgets
This website will let you create and customise a twitter widget and at the end give you the code you will need for your website.
In the first screen we need to select ‘Profile Widget’

Next we need to enter our twitter username so the widget knows who we are:

With this information in you can press ‘Test Settings’ which will then let you see how the widget will look on the right hand side – each time you make a change you can press this button to update the preview.
Next we will customise the appearance – enter colours that will match your websites colour scheme – need some help with your websites colour scheme? try these useful webistes

Finally we need to define the size of the widget, if you are unsure on the width of it try auto width

With all of the settings entered we then need to get the code to insert into our website via the ‘Finish & Grab Code button’ :

With this code you can then paste it into your website where you want your feed to appear.
This website uses WordPress so the next steps will show you how to add the feed to a WordPress powered website.
To add the twitter feed you will need to insert a ‘text’ widget to a sidebar where you want the twitter feed to appear, this is done via ‘Appearance’ and then ‘Widgets’
you will then need to locate the ‘Text’ widget and drag it into the sidebar

With this placed in the sidebar the next step is to paste in the code we created via the twitter website and save the changes.

This will then insert the feed into your WordPress powered website
Blog post by Alex Wells
Working as a Website developer I love nothing more then working waist deep in code, I have specific interests in PHP and WordPress development but mostly working with local businesses to provide them with a website that meets their needs. Contact me if you have a project in mind and would like to get an input from an experienced website developer.
Web Developers RSS feeds – design resources
RSS feeds are incredibly useful for receiving news and updates from your favourite sites and being a web developer they are a vital source of new information. I check my feeds daily on the way to and from work keeping up to date with news and events as well as reading tutorials from some of my favourite sites.
I have collected a list of RSS feeds while researching and just browsing the web and wanted to list them so others interested in website development / design might find them useful, if you know of any good feeds please let me know.
In this post i am going to share some of the RSS feeds i use to find design resources and website design examples:
- http://365psd.com/
- http://bestwebgallery.com/
- http://creativenerds.co.uk/
- http://csscreme.com/
- http://designblurb.com/
- http://designchair.co.uk/
- http://www.smashingapps.com/
- http://freepsdfiles.net/
- http://www.fuelyourcreativity.com/
- http://www.shapes4free.com/
Blog post by Alex Wells
Working as a Website developer I love nothing more then working waist deep in code, I have specific interests in PHP and WordPress development but mostly working with local businesses to provide them with a website that meets their needs. Contact me if you have a project in mind and would like to get an input from an experienced website developer.
Web developers RSS feeds – WordPress
RSS feeds are incredibly useful for receiving news and updates from your favourite sites and being a web developer they are a vital source of new information. I check my feeds daily on the way to and from work keeping up to date with news and events as well as reading tutorials from some of my favourite sites.
I have collected a list of RSS feeds while researching and just browsing the web and wanted to list them so others interested in website development / design might find them useful, if you know of any good feeds please let me know.
In this post i am going to share my top 10 WordPress feeds (in no particular order):
- http://www.doitwithwp.com
- http://www.wpbeginner.com/
- http://wpcandy.com
- http://www.wptavern.com
- http://wp.tutsplus.com
- http://www.wplover.com
- http://www.wpmayor.com
- http://wpengineer.com
- http://wphacks.com
- http://lorelle.wordpress.com
Blog post by Alex Wells
Working as a Website developer I love nothing more then working waist deep in code, I have specific interests in PHP and WordPress development but mostly working with local businesses to provide them with a website that meets their needs. Contact me if you have a project in mind and would like to get an input from an experienced website developer.
Email unsubscribe links
Removing yourself from an emailer / newsletter database can vary from being a pain to next to impossible, if your lucky there is a link at the bottom that when clicked automatically removes you from the email list and thats it, if your unlucky you will need to login to your account and update your email preferences – good luck remembering the password for the account you set up months ago and inputted a random mush of letters for the password as you didnt think you would need to login again.
but today i came across the best example i have see, its the hobby craft emailer and the link at the bottom of the email takes you to this:

what i like about it is that it gives you the option of trying a few more emails to see if you are sure you want to unsubscribe, if not it removes you from the system right away defiantly something i will implement.


