The Blog - Archive for WordPress

Drupal vs WordPress: Which to use?

by Christos Filed under: Knowledge

They are both content management systems. One was built specifically for bloggers (which is a pretty large market segment) and the other was built for any arbitrary type of content (which although it is an even bigger market, the ambiguity of it negatively affects awareness of what Drupal can do).

Nonetheless, should large and arbitrary be better than specific? You could convert Drupal into a WordPress blog by just defining your blog post type in Drupal’s database. A commenting system is already there for all types of content. It also has user registrations out of the box with an even more advanced user roles system than WordPress. So why not use it?

If all you want to do is blog, then WordPress is an already customised Drupal installation for you. It will give you all the stats you need and some plugins for the peripheral features you need for your blog.

However if your blog is less than half of your website’s content, then the time you will spend tweaking WordPress is more than the time you will spent tweaking Drupal. The time spent adding new types of content into Drupal is linear, and in most cases it is faster than doing it with plain PHP. It’s main benefit is that it allows non-programmers to edit vast amounts of arbitrary types of content without hassling the developer.

Well, is that good? It depends. If you don’t want the hassle of customer support for content updates to their website, that’s the way to go. However website maintenance might be your milk and bread. That’s arguable though, WordPress can still be configured with plugins like Advanced Custom Fields so that its users have the same level of control over the content.

Both systems have a relatively steep learning curve, I have no side by side comparison but you can assume that you will waste time on both systems to learn about them.

WordPress is a bit better when it comes to version control, as more things will most likely be in PHP files. However Drupal is much more heavily reliant on the database, which makes multiple developers working together on it a big pain. To this day this remains my personal biggest annoyance with Drupal, how would you get a large team of developers to work on the same website?

WordPress Custom Post Types – Changing Slug

by Tom H. Filed under: Wordpress

It’s surely too early in the New Year for WordPress to be causing grief? Apparently not :)

We just had a simple request from a client, “Can we change the URLs for our custom post type pages” – no problem I thought!

However, this one has taken me longer than expected. It should have been a simple case of changing the Slug parameter when registering a custom post type.

So:

    $args = array(
        'labels' => $labels,
        'public' => true,
        'publicly_queryable' => true,
        'show_ui' => true,
        'query_var' => true,
        'menu_icon' => get_template_directory_uri() . '/images/iconbacourse.png',
        'rewrite' => array('slug' => 'old-slug'),
        'capability_type' => 'post',
        'hierarchical' => false,
        'menu_position' => null,
        'supports' => array('title','editor','thumbnail')
      );

    register_post_type( 'myposttype' , $args );

Becomes:

    $args = array(
        'labels' => $labels,
        'public' => true,
        'publicly_queryable' => true,
        'show_ui' => true,
        'query_var' => true,
        'menu_icon' => get_template_directory_uri() . '/images/iconbacourse.png',
        'rewrite' => array('slug' => 'new-slug'),
        'capability_type' => 'post',
        'hierarchical' => false,
        'menu_position' => null,
        'supports' => array('title','editor','thumbnail')
      );

    register_post_type( 'myposttype' , $args );

This should mean posts that were at /old-slug/page-name are now at /new-slug/page-name

Doing this, meant the old Urls were redirecting to the correct location, but I was getting a 404! The solution was upsettingly simple, go in to WP Admin, Settings, Permalinks and re-save your permalink structure.

Hope this might help someone, and happy WordPressing in 2012 ;)

WordPress Versions – Staying up to date!

by Tom H. Filed under: Technology

Anyone that has run a copy of WordPress for any period of time will appreciate the need to keep it up to date with the latest version.

It’s a fantastic product but is always being improved and hasn’t historically had the best track record for security.

To help us out with this problem, we’ve just built a widget for the fantasitc http://geckoboard.com/ that will allow us to see, at a glance, which of the WordPress sites we manage that need updating.

Check it out:

It shows us each of our sites, the current version of WordPress and the website URL.

Using the SVN tags from the WordPress source control, we also grab the current release version number of WordPress so we can compare it to the version each site is running to colour the output. Versions that are behind get output in red so we can’t miss them!

The plan, when we plug in a few other key bits of info from around the company, will be to have this mounted permanently in the office on a nice big telly.

Enhanced by Zemanta

Using WordPress: Managing users and adding your avatar

by Dale-Anthony Filed under: Knowledge

Sometimes you will want to allow other people to edit the content of your website, the best way to allow them to do so is by setting them up with a user account in WordPress.

Note: Never give your own WordPress username and password to anyone, you should always setup separate accounts for each user.

To add a new user from the WordPress admin area click on the ‘Users’ button in the main navigation. You should now see a screen listing all of the users that are already in WordPress. To add a new user click the ‘Add New’ button.

Top tip: It’s a good idea to assign a temporary password to the user to begin with, this way once the user logs into WordPress they can choose a password of their own.

After you have chosen a password for the user you need to assign them to an appropriate user role. There are various different user roles which you can choose from, it’s important that you give them the correct level of access:

Administrator – Somebody who has access to all the administration features
Editor – Can publish and manage own and other users content.
Author – Can publish and manage their own posts
Contributor – Can write and manage their posts but not publish them
Subscriber – Somebody who can only manage their profile

Finally press the “Add New User” button, and you’re done! You’ve now added a new user to WordPress who can login and edit content.

Adding an avatar

Sometimes there are areas of your website that an avatar is displayed, for example avatars are often shown next to comments.

Setting up a avatar is easy and uses a system called Gravatar:

A Gravatar is a globally recognised avatar which is linked to an email address and used on your own website, but also on other websites you contribute to and comment on.

[wpvideo HNyK67JS]Firstly go to the Gravatar website: www.gravatar.com and click the ‘Get your Gravatar today’ button.

On the next screen enter your email address and press ‘Signup’

Note: It’s important you use the same email address here as you did in WordPress as this is how your Gravatar is linked.

You should now receive an email containing a link to confirm your address, from the email click the link, this will take you back to the gravatar website and ask for some additional details.

Once your account is setup you’ll be taken to a screen which allows you to manage your Gravatars. Add a avatar by clicking the ‘Add one by clicking here’ text and follow the instructions to upload your avatar from your computer.

Once you’ve done this you avatar will automatically be linked to your WordPress account and any other websites that support Gravatars (there are lots of them!).

Top tip: You can change your avatar at any time by revisiting the Gravatar website, you can also link it to additional email addresses here.

Using WordPress: Adding images, links and videos

by Dale-Anthony Filed under: Knowledge

When creating a post or page to your website you’ll often need to add images, links or videos. WordPress makes this super easy.

Images

Sometimes you’ll want to add an image to a post or page, in order to do this you need to upload the image to your website.

Firstly click the ‘Add an image’ button which is shown just above the content editing area, this will open a window that will let you upload an image. Next press ‘Select Files’ and then choose the image you’d like to add from your computer.

After the image has finished uploading you will see an overview of the image details, if you like you can add additional details here such as a name and alternate text, doing so will improve the accessibility of your post or page.

You can even make basic edits such as rotation and cropping by pressing the ‘edit’ button on the image detail screen.

Finally you can change what the image links to, the size and the alignment of the image using the options at the bottom of the window. Once you are happy with the image details and settings press ‘Insert into Post’

You will now see the image in the content editor and can continue editing your post or page around it.

Links

Quite often you may find that you want to add a link, this could be a link to a previous post, another page or to anything else online.

To add a link simply highlight the text you would like to link from or click the image you’d like to add a link to.

Next click the ‘Insert / edit link button’ (), a new window will open, from this window you can select an existing page or post to link to, or if you’re linking to another website just type or paste the web address into the box titled ‘URL’.

Once you’ve added your link press ‘insert’ which will add the link to the text or image you highlighted.

Top tip: You can tell if text has a link applied to it as it will show in either blue or purple and will have an underline.

To remove a link highlight the text or image that contains the link you’d like to remove and press the ‘Unlink’ () button.

Video

Inserting a video into a post or a page is very straightforward, all you need to do is paste the video URL into the content editor and WordPress will do the rest, many popular video websites such as YouTube and Vimeo are supported.

Top tip: After you’ve added a link, image or video it’s a good idea to test that they work correctly by using the ‘Preview’ button (in the top right hand corner).