J Norton Freelance Web Developer and Designer Logo
Website developer and designer providing WordPress
and Magento Commerce solutions tailored to your needs.

Tags

Aug
24

Following on from my previous WordPress tutorial relating to template redirects, this article features a different technique to include custom templates within your WordPress website that is more efficient than doing a template redirect.

Aug
21

WordPress provides a simple way to add periodic tasks via cronjobs that initiate custom functions. There are various situations where you will want to run custom PHP code such as updating post statuses or emailing registered users links to new site content.

Whatever your requirement, the WordPress scheduling system is easy to use and extend.

The following code is a basic example of creating an action (hook) that is initiated on a daily basis.

Aug
14

Today's WordPress tutorial is a quick one for fixing an annoying issue with custom WordPress menu's in which there is no ability to add first and last classes to menu items.

Simply place the following code into your functions.php file and the classes menu-item-first and menu-item-last will be added to your custom WordPress menus.

Aug
09

WordPress Tutorial: Template Redirects

Tue, 08/09/2011 - 17:30

Sometimes when developing with WordPress you may wish to redirect a user to a bespoke template that is different from the standard blog functionality of posts and archives. Maybe you want a certain view of content featuring a custom loop for displaying a combination of custom taxonomies and custom post types. Whatever the situation, WordPress makes it easy to redirect users to certain templates when specific conditions are met.

Aug
04

WordPress has a great admin user interface complimented by the TinyMCE wysiwyg editor but there are times when the default setup of TinyMCE doesn't give you the flexibility you desire. Maybe you want editors to add some code samples, or wrap a portion of text in an address tag.

Using the following code snippet you can customize the output of the TinyMCE block format drop down list. Simply copy the code to your functions.php.

Aug
01

WordPress Tutorial: Admin Body Classes

Mon, 08/01/2011 - 18:43

The WordPress admin interface is a clean easy to use GUI but there are times when you need to style admin content based on certain custom post types.

I recently had an issue where I needed to hide the date selector drop down select menu - the one with the option to 'Show all dates'.

The default 'Show all dates' menu is designed to filter posts by publish date and because my custom post type was a date based event management tool, I already had a custom date selector for events.

Jul
25

WordPress offers a decent media management solution featuring various media types such as images, PDFs, etc. By default, post thumbnails are inactive in WordPress and will need to be switched on to allow editors to use the 'Featured Image' image manager when creating and editing posts.

Jul
21

Here is a quick fix for outputting WordPress search parameters within form fields such as search input boxes.

Just add the following snippet to your functions.php file:

function new_get_search( $escaped = true ) {
$query = urldecode(get_query_var( 's' ));
if ( $escaped ){
$query = esc_attr( $query );
}
return $query;
}
add_filter( 'get_search_query', 'new_get_search');

Jul
13

WordPress Tutorial: Disable Autosave

Wed, 07/13/2011 - 16:11

WordPress does a good job at saving headaches for editors by including helpful functions such as automatically saving posts when the post edit screen is open.

The only problem with this particular feature is that it creates an overhead on the server that can impact performance on the front-end, customer facing website. This problem becomes even more pronounced when you have multiple editors writing posts at the same time. The automatically saved posts build up into a large amount of database inserts that can form a bottleneck on the server.

Over the last few years I have repeatedly been in situations where I am working with multiple clients on tight time scales. After finishing the design of a website I then moved on to the build process often integrating designs from Photoshop PSD's into HTML / template markup for WordPress and Magento.