Category: tutorials

WordPress Simple SEO

By Lewis Wolfe, Monday, September 29th, 2008

wordpress-seo.gif Having followed the progress of a fair few WP sites, some thoughts on the subject of SEO for WordPress.

It shouldn’t really be simpler - at the time of writing, for the ’standard blog’ - whatever that might mean - the default WordPress install works just fine. This could change, either on the WordPress side, or by any popular search engine radically changing the way they do things, but not so likely…

You can get into more of a mess by messing with the default, than leaving well alone.

Continue reading »

WordPress and Programming Tutorials

By Lewis Wolfe, Wednesday, April 23rd, 2008

People (visitors) quite often enquire why there is a lack of detail in the various code snippets given as brief tutorials on this blog. And it’s true, often only the only relevant line of code is given.

Well, simple answer - I am a great believer in the principle:

If you have ask - you probably shouldn’t be doing…

Continue reading »

WordPress themes: keep it simple

By Lewis Wolfe, Saturday, April 12th, 2008

Keep it simple - KIS - is fairly obviously good advice for any WordPress theme builder.

Keep it universal - there are a lot of people out there, running all kinds of different system, doing different and strange things with the files, any complexity is increasing the risk of breaking the theme for them…
Continue reading »

Wordpress: switch CSS stylesheets

By Lewis Wolfe, Tuesday, April 8th, 2008

It is possible to switch a theme’s CSS, depending on whether widgets are enabled or not - whether, like a lot of things in programming it is a good idea to do this, just because you can, is another matter…
Continue reading »

WordPress Database Operations

By Lewis Wolfe, Sunday, April 6th, 2008

mysql.gifYou will need a little knowledge of PHP and MySQL to get the hang of this - but it is perhaps easier than it looks at first sight, and it’s also a good way of expanding your skills in this area…

You want to get some info from the database, and you want it more flexibly than built-in functions like, say, wp_list_pages - this is the general how-to …
Continue reading »

Add a podcast quicktag to Wordpress editor

By Lewis Wolfe, Thursday, March 27th, 2008

This tutorial adds a button to the Wordpress post/page editor in code view, to add a link to a podcast file in your post and therefore also your RSS feed - so that you should end up with this:-

podcastbutton.gif

Continue reading »

Use WordPress to podcast

By Lewis Wolfe, Wednesday, March 26th, 2008

pcast.jpgI’m that ancient that I’m not quite sure web pages should have images on them, but if you do want to try this new-fangled (in 2005) podcasting business, it’s pretty simple with WordPress.

Strictly, what a podcast is not is a link to a media file from a web page. Yes, large media websites, eg bbc.co.uk think that’s exactly what it is, but what do they know…

Continue reading »

WordPress child page menu

By Lewis Wolfe, Thursday, February 21st, 2008

Here’s a nice and neat code snippet - making use of the template and conditional tags to output unordered list items for all child pages under the current page - with links - and just the thing to stick in a theme’s sidebar.

Best used in conjunction with is_page, of course, so…

<?php
if(is_page()){

$parent = ($post->post_parent == 0)? $post->ID : $post->post_parent;

wp_list_pages(’child_of=’.$parent.’&title_li=’);

}

?>

Wordpress Page Menu code

By Lewis Wolfe, Saturday, January 19th, 2008

As requested, the code for page menu tabs - leaving open the possibility of using the ’sliding doors’ technique - put it in a theme’s functions.php, and the usage, if not too obvious, would be something like…

<ul id=”tabmenu”>

<?php echo buildMenu(); ?>

</ul>

Continue reading »

Banners in some posts on the index page

By Lewis Wolfe, Tuesday, May 22nd, 2007

You want to put an advert (or anything else) after some posts on the front page, but not others.

There are some fancy programming ways of doing this involving template tags, but this way will do just fine and couldn’t be simpler.

First, find the Loop in your index.php

<?php if (have_posts()) : ?>

<?php while (have_posts()) : the_post(); ?>

… the post …

<?php endwhile; ?>

Continue reading »