Tag Archives: wordpress

How to create a wordpress magazine theme using Twenty Ten – Part 4

This is part three of a short series outlining how to tweak a wordpress template to get some magazine style functionality. Part onePart Two and Part three are available here.

In part three of this short series we looked at adding a second loop to our edited index page to get round the problem of our Featured Post being repeated on the front page. In this final part I’ll look at adding a thumbnail and styling up the page.

Image thumbnails

Over the years, theme designers magazine themes have come up with many weird and wonderful ways of getting thumbnail images on front pages. But it’s only recently that WordPress developers added solid support.

One of the things I wanted to do with this series is to avoid too much tweaking of files. So I’m going to be relying on some of the core features for wordpress to get thumbnails on the page rather than fancy tricks. So beefore we get back in to editing the template code to display thumbnails there are few things we need to check.

Media settings

When you add an image to a blog post you are given the option to add it as a thumbnail, medium, large or original size. We are going to be using the standard function to to get a thumbnail (you may remember it from part 1) and it uses the same shorthand to get an image

<?php the_post_thumbnail('thumbnail'); ?>

The sizes for each these are set in the Media section of the settings tab.

The image size options

So our edited front-page is going to be based on these sizes. If you want any other sizes for your page you should set them here first. The downside of working this way is that this will impact on the sizes of images placed in your blog posts -that’s the trade off of keeping things simple.

Adding a featured image.

Version 2.9 of WordPress included a new post thumbnail option which allowed you to define an image to display “as the representative image for a Post or Page. The display of this images is up to the theme. This is especially useful for “magazine-style” themes where each post has an image.” The feature was renamed “featured image” in wordpress 3.0 – I’m guessing to avoid confusion with thumbnails. Whatever it’s called it’s ideal for our front page.

Adding a featured image

When you write a post you should see a panel called Featured Image. Clicking the Add featured image link opens up a standard image browser. You simply find the image you want to use and click the Use as Featured Image link and you’re done.

So before we go on, add a featured image to the post in your Featured Story category.

Adding the thumbnail to the template

Now that we have set up the Featured image we can edit our template file and get an image on our frontpage.

Open up the Main Index Template file and add the following and edit the first loop so it looks like this:

<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf(esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php 	the_title(); ?></a></h2>

<?php the_post_thumbnail('medium'); ?>

<?php the_excerpt();?>

We’ve added the post_thumbnail function and called the medium sized image (300×300). The result should be something like:

Our medium thumbnail

Now do the same with the second loop.

<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf(esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php 	the_title(); ?></a></h2>

<?php the_post_thumbnail('thumbnail'); ?>

<?php the_excerpt(); ?>

We’ve called the same function but specified the thumbnail image. The results should be something like this (don’t forget you need to add a featured image to your other posts)

Thumbnails added to each loop

And that’s it.

Adding some style.

Technically we are done. All the elements we want are on the page. But it’s not looking as good as it could be. We need to add some styling information and make some amendments to the stylesheet file.

I’m not going to go in to a big write up of CSS here (try the excellent W3Schools for a basic intro) but if you’re interested in tweaking wordpress templates it’s one of those areas you’ll be spending a lot of time with.

For now, its enough that when dealing with stylesheets, we need to keep our eye open for two things; divs and classes.

Divs

If you look at the Main Index template file, you’ll see the following lines

<div id="container">
			<div id="content" role="main">
......
		</div><!-- #content -->
		</div><!-- #container -->

The div tag is an html element that doesn’t actually display anything by default, it defines a section of the page. When it comes to look and feel, the key part is the id . This ‘connects’ the div to display instructions defined in the stylesheet. The style definition for container is:

#container {
	float: left;
	margin: 0 -240px 0 0;
	width: 100%;
}

Anything that sits between the div tags will be effected by this definition.

Classes

One restriction of ID’s is that you can only use them once on a page. So if you have a lot of elements on a page that you want to style you have to use a class. Remember the html we used for our post title:

<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( 		esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>

The first part of that is:

<h2 class="entry-title">

That means we take the standard H2 formatting and add some custom styling.

#content .entry-title {
	color: #000;
	font-size: 21px;
	font-weight: bold;
	line-height: 1.3em;
	margin-bottom: 0;
}

This says, any time the class entry-title (denoted by the full-stop) is referenced inside the content div (denoted by the # symbol) apply the following styling.

Image Alignment

The first thing to sort out is the alignment of the images. I’m going to cheat a little here and pick up the standard style call for images.

Change the post_thumbnail function call in the first loop to the following :

<?php the_post_thumbnail('medium',array("class" => "alignleft")); ?>

The post thumbnail function allows you to stack extra information in parameters that can be ‘added’ to the code as it’s generated. We have stuffed a reference to a style called alignleft. If you call up the Stylesheet file in the theme editor you can find the definiton of that style (you may have to search for while)

#content .alignleft,
#content img.alignleft {
	display: inline;
	float: left;
	margin-right: 24px;
	margin-top: 4px;
}

This is very similar to our post title example above but this time there is also a reference to the image tag (img).

To finish up we can add the same class to the thumbnail call in the second loop:
Change the post_thumbnail function call in the first loop to the following :

<?php the_post_thumbnail('thumbnail',array("class" => "alignleft")); ?>

Boxing in the featured story

To make my featured story stand out I’m going to wrap it in a grey box. To start with I’m going to use a DIV to define that extent of the box.

<div id="content" role="main">
			<div id="FeaturedStory">
...the rest of the loop....

<?php the_excerpt();?>
<?php endwhile; ?>
			
			</div><!-- #FeaturedStory -->

I’ve added a new DIV tag with an id called FeaturedStory and closed the div after the end of the loop.

If you update the file and looked at the page you should see nothing new. Remember DIV tags don’t show up till you style them.

Open the Stylesheet file in the editor window and scroll all the way down to the bottom. Add the following:

#FeaturedStory {
	background: #f7f7f7;
	color: #222;
	margin-bottom: 18px;
	padding: 1.5em;
	height: 350px;
}

This does the following:

  • Changes the background colour to grey
  • Changes the text colour to a dark grey
  • Pads the bottom of the box with 18 pixels of space
  • Pads the all the way round with 1.5 em of space
  • Sets the height of the box to 350pixels

Save the file and look at the results. You’ll see a box around the featured content.

Conclusion

That’s pretty much it. We’ve pulled in a featured post and thumbnail to go with it. Then we added a second loop to pull in the rest of the posts without duplicating our featured post on the page and added a thumbnail to them. Then we styled the results to align the thumbnail and wrap the featured post in a box to make it stand out.

Along the way we’ve touched on PHP, functions, variables and stylesheets. All of which are play a big part in theme development. But we have done it all with the minimum of alteration to the core theme files.

Some issues

This method is not without its issues. Editing the raw files like this is risky if you forget to back things up. There is also the risk that if the theme is updates by wordpress (as it is from time to time) then your customization will be deleted. But the exercise has been more about some of the basic concepts than a robust solution.

So I hope you found it useful and it made sense. Here’s the finished Main index template file:

<?php
/**
 * The main template file.
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query. 
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.0
 */

get_header(); ?>

		<div id="container">
			<div id="content" role="main">
			<div id="FeaturedStory">

<?php  

			/* This is the new loop to display a featured story.
			 * It creates a variable and then loads all the posts that match the query.
			 */

$my_query = new WP_Query('category_name=Featured Story&showposts=1');


			/* Now it loops through the results and displays the content.
			 */

while ($my_query->have_posts()) : $my_query->the_post(); 
$do_not_duplicate = $post->ID;

			/* We load the Page ID in to a variable to check for duplicates later on
			 * Then it displays the title as a working link with formatting to 
			 * match the Twenty Ten template.
			 * Then we display the excerpt.
			 * Then we finish the loop with the endwhile statement
			 */
?>

<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf(esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php 	the_title(); ?></a></h2>
<?php the_post_thumbnail('medium',array("class" => "alignleft")); ?>
<?php the_excerpt();?>
<?php endwhile; ?>
			
			</div><!-- #FeaturedStory -->

 <?php 
 
			 /* This is the second loop that replaces the standard loop
			  * It uses the standard loop function calls
			 */
 
 
 if (have_posts()) : while (have_posts()) : the_post();


if( $post->ID == $do_not_duplicate ) continue; 
update_post_caches($posts); 

 			/* This line gets the post ID and checks it agains our duplicate variable
 			 * If it matches it does nothing. If it's different we display the content
			 */

?>

<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf(esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php 	the_title(); ?></a></h2>
<?php the_post_thumbnail('thumbnail',array("class" => "alignleft")); ?>
<?php the_excerpt(); ?>
<?php endwhile; endif; ?>


			<?php
			/* Run the loop to output the posts.
			 * If you want to overload this in a child theme then include a file
			 * called loop-index.php and that will be used instead.
			 */
			 //get_template_part( 'loop', 'index' );
			?>
			</div><!-- #content -->
		</div><!-- #container -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

Don’t forget, you need to update the Stylesheet file as well.

Questions, comments etc always welcome

How to create a wordpress magazine theme using Twenty Ten – Part 3

This is part three of a short series outlining how to tweak a wordpress template to get some magazine style functionality. Part one and Part Two are available here.

In the previous part of this tutorial I looked at how we could display some custom content on our front page by adding another loop to the file. This gave us chance to experiment with template tags to customize what we say. But I also pointed out that we had a problem.

Our ‘new’ loop pulls out the latest story in our featured story category and puts the title and excerpt at the top of the page. But the original wordpress loop is still there. It pumps out the last 10 posts published on the site and theres a good chance that our featured post is one of them. That means we get the same story twice on the homepage.

Turning off the original loop

If you remember, the orginal loop is called using a get_template_part function in the Main Index Template file.

<?php
			/* Run the loop to output the posts.
			 * If you want to overload this in a child theme then include a file
			 * called loop-index.php and that will be used instead.
			 */
			 get_template_part( 'loop', 'index' );
			?>

We can turn the loop off by commenting it out.

<?php
			/* Run the loop to output the posts.
			 * If you want to overload this in a child theme then include a file
			 * called loop-index.php and that will be used instead.
			 */
			 // get_template_part( 'loop', 'index' );
			?>

Notice how the function call has turned green like the comments. By adding a // in front of the function we turn it in to a comment which the server will ignore. If you update your file and look at the front page, you’ll see you only have the featured post.

Commenting out is a common trick when developing code. It allows you to try a few different things without deleting anything. Just don’t do to much, things can get confusing.

You may also have noticed that other comments in the file are marked between /*…*/ rather than a //. They are both valid. The /*…*/ is usually reserved for multi-line or blocks of comments rather than single lines. It also makes for a handy way to differentiate between comments (description of the code) and commenting out.

Adding another loop

Getting rid of the loop altogether is a bit of severe way to solve the repeat post option. What we need to do now is add a loop that allows us to get the posts back in a more controlled way. Add the following code after the new loop we added and before the original loop.

....<?php endwhile; ?>

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

<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf(esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php 	the_title(); ?></a></h2>

<?php the_excerpt(); ?>
<?php endwhile; endif; ?>

<?php
			/* Run the loop to output the posts......

Update the file and have a look at the results. You’ll notice that the actual content is no different from the first loop we created. What is different is the way we have called the loop.

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

This line starts the loop in a standard way. In our previous loop we used a custom query because we wanted one post from a specific category. So we set some conditions, if you have any posts then load them up, we’ll loop through them and while there is some content we’ll spit it out.

<?php endwhile; endif; ?>

The last line is also different. It ends the loop and, in this case, also tells the server to stop asking if we have any posts. So now we have our posts back and we are in control of the content we display. But this still doesn’t solve the duplicate post problem.

What we need is way we can save the details of the post from the first loop (the featured story) and check that against the second loop. Each time the loop goes round and processes a post we want to ask if it’s the same post as the featured story. If it is, ignore it and move on.

Making an ID.

WordPress has a very simple way of identifying posts. It gives them an ID number. This ID is unique to the post and even if we don’t see it anywhere on the page it’s used all the time behind the scenes. We’re going to use that ID number to compare our posts and weed out the duplicate.

The first thing we need to do is grab the ID of the featured story post.

Find the featured story query in your Main Index Template file (i’ve removed all the comments from mine for this part)

$my_query = new WP_Query('category_name=Featured Story&showposts=1');
while ($my_query->have_posts()) : $my_query->the_post(); 

Add the following directly underneath

$do_not_duplicate = $post->ID;

That line creates a variable (remember anything with a $ is a variable) that stores the post ID for us to check

Now go to your second loop and directly after:

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

add

<?php if( $post->ID == $do_not_duplicate ) continue; 
update_post_caches($posts); ?>

As it works through the loop it will get the post ID and compare it against our variable $do_not_duplicate if they are the same (==) then do nothing (confusingly, continue means do nothing and move on to the next post). The last part is there as a technicality to ensure that these custom loops don’t cause problems for plugins.

If you update your file and take a look at the front page then you should see the duplication problem has gone away

Conclusion.

Commenting out the original loop and replacing it with our own custom loop means we have a lot more control over what content is shown. It also meant that we could add a little extra code to get rid of the duplicate post problem.

Tomorrow, well look at adding a thumbnail and styling up the page. For now, here is your complete Main Index Template file so far:

<?php
/**
 * The main template file.
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query. 
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.0
 */

get_header(); ?>

		<div id="container">
			<div id="content" role="main">

<?php  

			/* This is the new loop to display a featured story.
			 * It creates a variable and then loads all the posts that match the query.
			 */

$my_query = new WP_Query('category_name=Featured Story&showposts=1');


			/* Now it loops through the results and displays the content.
			 */

while ($my_query->have_posts()) : $my_query->the_post(); 
$do_not_duplicate = $post->ID;

			/* We load the Page ID in to a variable to check for duplicates later on
			 * Then it displays the title as a working link with formatting to 
			 * match the Twenty Ten template.
			 * Then we display the excerpt.
			 * Then we finish the loop with the endwhile statement
			 */
?>

<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf(esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php 	the_title(); ?></a></h2>
<?php the_excerpt();?>
<?php endwhile; ?>


 <?php 
 
			 /* This is the second loop that replaces the standard loop
			  * It uses the standard loop function calls
			 */
 
 
 if (have_posts()) : while (have_posts()) : the_post();


if( $post->ID == $do_not_duplicate ) continue; 
update_post_caches($posts); 

 			/* This line gets the post ID and checks it agains our duplicate variable
 			 * If it matches it does nothing. If it's different we display the content
			 */

?>

<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf(esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php 	the_title(); ?></a></h2>
<?php the_excerpt(); ?>
<?php endwhile; endif; ?>


			<?php
			/* Run the loop to output the posts.
			 * If you want to overload this in a child theme then include a file
			 * called loop-index.php and that will be used instead.
			 */
			 //get_template_part( 'loop', 'index' );
			?>
			</div><!-- #content -->
		</div><!-- #container -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

Any questions, comments etc. Let me know.

Note: I got the duplicate post detection code from wpmodder.com, a great site.

How to create a wordpress magazine theme using Twenty Ten – Part 2

This is part two of a short series outlining how to tweak a wordpress template to get some magazine style functionality. Part one is available here.

The copy to clipboard option

Note: If you want to copy code directly from this tutorial roll you mouse over the top, right-hand corner of the code and a little window will pop up with a copy code function.

In the previous part of this tutorial we set ourselves up to experiment with the Twenty Ten Template. So at this point you should have

  • A working installation of the wordpress.org (version 3 or above)
  • The Twenty Ten theme set as the active theme
  • A number of posts sorted in to three categories – News, Sport and Featured Article
  • The permissions for the Twenty Ten theme folder set to 666

The next step is to take a look at the files we are going to edit.

The Main Index template

If you switch to Appearance > Editor and click the Main Index Template link on the right.

You should see the following in the editor window.

<?php
/**
 * The main template file.
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query. 
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.0
 */

get_header(); ?>

		<div id="container">
			<div id="content" role="main">

			<?php
			/* Run the loop to output the posts.
			 * If you want to overload this in a child theme then include a file
			 * called loop-index.php and that will be used instead.
			 */
			 get_template_part( 'loop', 'index' );
			?>
			</div><!-- #content -->
		</div><!-- #container -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

We start with some comments. Notice that and see where the PHP starts and ends and you should be able to spot a few function calls. These essentially piece the page together bit by bit. For example…

get_header();

…calls the first part of the webpage including all the HTML needed to set the page up and display the blog title and navigation. The only function that might not be immediately obvious is:

 get_template_part( 'loop', 'index' );

This function calls a template file called loop (loop.php) which contains all the information needed to get and display the list of posts on the front page. It also tells the function that this request has come from the index(homepage).

You can take a look at the loop.php template by opening it in the editor – pretty scary. But the loop is key to the way WordPress works.

What is the loop

Here’s what WordPress say about the loop:

The Loop is used by WordPress to display each of your posts. Using The Loop, WordPress processes each of the posts to be displayed on the current page and formats them according to how they match specified criteria within The Loop tags. Any HTML or PHP code placed in the Loop will be repeated on each post. When WordPress documentation states “This tag must be within The Loop”, such as for specific Template Tag or plugins, the tag will be repeated for each post.

Just to put that in to context, a standard front page would use the loop to :

  1. Get the last 10 posts in the wordpress database, sorted in date order
  2. For each of each post, get the headline, content and other related content and create the HTML to display it
  3. Repeats that process until all ten posts are done.

This might sound complicated but it’s actually got a lot simpler in WordPress 3.0. In earlier versions the loop would be part of the index page. Instead of the relatively simple file above, you would have all the loop content in there as well. This meant a lot more to pick through to sort out a page. You could argue that it’s just shifted the complex stuff to another file. But as we’ll see, it does make life easy for us.

The bottom line is that getting a grip on the loop is the key to tweaking a template. So let’s have a go.

Backing-up

Make sure you have the Main Index Template file loaded in to the editor

  • Copy all the content
  • Open your text editor and paste the content in to a new document.

This is your back up of the file. If anything goes wrong, you can just copy and paste the original file content back. I would advise that you do this at regular intervals. Just copy and paste in to the file and you’ll have a big file with each iteration of the file.

Adding another loop

Now that we are backed up we can edit a file. When working I tend to have two tabs open so I can switch between the backend, where I’m editing, and the front end to see the results.

So, in the backend make sure your in the editor and your looking at the Main Index Template file .

Just after:

<div id="content" role="main">

Add the following:

<?php  
$my_query = new WP_Query('category_name=Featured Story&showposts=1');
while ($my_query->have_posts()) : $my_query->the_post(); 
?>

<h2><?php the_title(); ?></h2>

<?php endwhile; ?>

Click the Update file button to save the changes.

The new loop content

The result should be that the title for the most recent post in the Featured Story category appears at the top of the page with the original list of posts below. It won’t work like a link, that comes next.

$my_query = new WP_Query('category_name=Featured Story&showposts=1');

The first line defines a variable or temporary store for information called $my_query (In PHP variables always start with the $ sign). The ‘value’ of that variable is the result of a new database query which uses the WP_Query function to ask for 1 post from the Featured Story category. By asking for one, you’ll get the latest one.

while ($my_query->have_posts()) : $my_query->the_post(); 

The second line starts a loop. It says that while our variable has content (posts) spit out the content of the post so we can do something with it. In this case we display the title:

<h2><?php the_title(); ?></h2>

Notice the mix of PHP and HTML here. The H2 tag formats the title but its the function the_title() that gets the content. The last bit…

<?php endwhile; ?>

…ends the loop and lets wordpress get on with the rest of the page.

Because we stipulated one post in the query the loop only goes round once. You could try adding more posts to the Featured Story category and adjusting the showposts value to see how it handles more than one post.

Dealing with errors

oops, you've missed something

When you bash around with PHP you will eventually come across an message like this when you look at your page. Don’t panic! All it means is that you’ve missed a bracket or other element in the code. Juts go back and check through. The error message even gives you a clue to what and where you made the mistake.

Adding more content

We can pull in more content from the post using some simple template tags.

Add the following after the_title() code:

<?php the_excerpt(); ?>

So the the bit you’ve added should resemble

<?php  
$my_query = new WP_Query('category_name=Featured Story&showposts=1');
while ($my_query->have_posts()) : $my_query->the_post(); 
?>

<h2><?php the_title(); ?></h2>
<?php the_excerpt(); ?>
<?php endwhile; ?>
The added excerpt

Update the file and have a look at the results. You should get the title with a short excerpt and a continue reading link. Check out the wordpress codex entry for the_excerpt() function to see what’s going on.

It’s that simple!

Making the title in to a link

The last part for today is to get the title to work as a link. Here’s the basic code:

<h2><a href="<?php the_permalink(); ?>" ><?php the_title(); ?></a></h2>

I’ve wrapped the the_title() function in a link. But instead of putting a website address on the href= bit I have called another function the_permalink() which returns a direct link to the story.

This will work but it isn’t really complete. To fit in with the template (and well written html) it needs some more information. To make sure it follows the same format as the template I’m going to cheat here and pull in some code from the standard loop (cut and paste from the loop.php file):

<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf(esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php 	the_title(); ?></a></h2>

If you look hard enough you can still see the the_title() function buried in there and the link. The rest is mix of HTML to make a link and some functions to call various bits of content. I won’t go in to them here but I can be sure that it will produce a link that will fit in with the rest of the template.

The formatted title

Conclusions

By adding another loop at the start of the index page we are able to control what which posts are displayed. Using template tags means we can pick which bits of the post we display. The simple nature of the new WordPress 3.0 main index template means we don’t have huge amounts of code to wade through and if we panic we can simply delete the stuff we have added and the original template is intact.

We still have some issues of styling and we also want to add some thumbnails to our posts. But if you look at the list of posts on the front page you will notice we have another problem – the featured post we called in our new loop is repeated in the original loop content. So quite a few things to sort out.

So tomorrow we will look at how we can replace the old loop all together and how to avoid that duplication. Then, in the final part we’ll look at how we can add the thumbnail and style the content to improve the look and feel. For now, heres the complete file we are left with (with comments added by me) :

<?php
/**
 * The main template file.
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query. 
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.0
 */

get_header(); ?>

		<div id="container">
			<div id="content" role="main">

<?php  

			/* This is the new loop to display a featured story.
			 * It creates a variable and then loads all the posts that match the query.
			 */

$my_query = new WP_Query('category_name=Featured Story&showposts=1');

			/* Now it loops through the results and displays the content.
			 */

while ($my_query->have_posts()) : $my_query->the_post(); 

			/* Then it displays the title as a working link with formatting to 
			 * match the Twenty Ten template.
			 * Then we display the excerpt.
			 * Then we finish the loop with the endwhile statement
			 */
?>

<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf(esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php 	the_title(); ?></a></h2>
<?php the_excerpt();?>
<?php endwhile; ?>

			<?php
			/* Run the loop to output the posts.
			 * If you want to overload this in a child theme then include a file
			 * called loop-index.php and that will be used instead.
			 */
			 get_template_part( 'loop', 'index' );
			?>
			</div><!-- #content -->
		</div><!-- #container -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>


As usual, comments and corrections always welcome.

How to create a wordpress magazine theme using Twenty Ten – Part 1

This is part one of a short series outlining how to tweak a wordpress template to get some magazine style functionality. Part two is live!

I’m in the process of updating installations of wordpress for our students to use. In one sense it’s a stop gap measure as we are in the process of commissioning a more “industrial strength” system for them. But even with a new system in place I think we will still leave some courses the option of going the wordpress route. The magazine students for example, love the flexibility (and low level of tech) that design templates offer. It doesn’t seem to have done them any harm in terms of nominations.

When it comes to design, finding a wordpress template you like is half the battle, there are thousands out there. As more people use wordpress to get publications online, magazine style templates have become a popular search and a big growth area for premium template developers.

It’s tempting to pay for a template you like – nothing wrong with that. But it’s not as complicated as you think to get something up and running, out of the box, with very little tinkering. Especially if you build on existing templates. So I thought it would be useful to look at how easy it would be modify the standard Twentyten theme in to something with some magazine functionality.

Hacking around like this is how I learnt a lot of stuff about wordpress and it’s also a way to get your feet wet with a programming language. In this case PHP

To play along with this you’ll need:

  • Your own installation of the latest version of the wordpress.org software (as I write this it’s 3.0.1). Sorry wordpress.com won’t do.If you have webspace and your thinking of adding wordpress you could do worse than check out the wordpress codex entry on installing wordpress. Some hosts will offer automated installation of wordpress – very useful.
  • A text editor. Even word will do.

That’s it.

The design

The adapted Twenty Ten Theme

This is a screenshot of what we are going to end up with. It has a front page that has a featured post at the top and sections underneath for each category. You’ll also notice that I’ve tinkered around with the header to remove the big image. OK, it’s not going to win any design awards but this is more about exploring the concepts.

Normally you’d plan this kind of thing on paper first. You’d also work on the code in a development environment. An installation of WordPress that only runs on your machine, not the web.

If you’re feeling really brave you can set one up. Here are few resources

I’m going to assume that we dive straight in and edit the template live! I know, bad, bad, bad. All I’m going to say is do so at your own risk.

A word on programming and PHP

WordPress is written in a programming language called PHP.  This isn’t a programming tutorial (I’m not going to explain the basics of programming), but there are a couple of important things to know.

Spotting PHP

You may already be familiar with HTML. You can spot it in the raw code for a webpage because it is contained in pointy – brackets.

<h2>Anything here will appear as a heading two</h2>

In a similar way, you can spot PHP in the raw code for a webpage because it is always between  <?php …. ?>. Here’s an example:

<?php the_title(); ?>

But if you look at the source for this webpage in your browser you will only see HTML. Why don’t we see the PHP?

PHP is a server side language. That means the webserver looks at the page and processes any PHP it finds before it sends you the page. When we use PHP as part of wordpress themes we are using it to generate HTML.

Functions

When programmers write code they will always look for ways to avoid repetitive jobs. Rather than write the same code every time, they write a function. This is a set of instructions that can be called when needed.  The example of PHP above is a function:

<?php the_title(); ?>

Whenever we want to show the title of post we call the function the_title() and the server runs the code needed to get all the right information. The semi-colon is also important. Here’s another example:

<?php the_post_thumbnail('thumbnail'); ?>

This time it’s a function to show a thumbnail for a post. But there is also some content in the brackets. This is a parameter or extra information that the function might need. When the server runs the function to get the post thumbnail it tells the function it wants the thumbnail sized thumbnail. I know, sounds like repetition. We could also say:

<?php the_post_thumbnail('medium'); ?>

That says ‘get the thumbnail but make it medium sized’. In case you were interested, the thumbnail and medium sizes are defined in the media settings of your blog. But more on that later.

There are hundreds of these functions in wordpress. Some are specific to templates, like the examples above, known as template tags. Others do the heavy lifting of making the blog work. We’ll be scratching the surface of the template functions and how they work here but I thought it was worth a little intro.

So we are going to be looking at a little PHP to call some functions to help us modify the TwentyTen template. Hopefully, now, that might statement might make a bit more sense.

How wordpress themes work.

You can get a really good overview of the way themes work from the wordpress codex and plenty of other websites around. A google search for wordpress theme tutorials should give you plenty of options. But let’s break it down in to a few simple ideas.

A wordpress theme is split in to parts:

  • the content you want in a structured form
  • instructions on the way you want it to look.

This information is held in a number of different files.  These are stored in a folder, one for each theme, in the WP_content/themes folder of your wordpress installation. The more complex the theme, the more files there tend to be.

In a basic theme, for example, you will have a file called single.php. That’s the content and structure part. This is a mixture of HTML and PHP. But the way it looks, the colour and style of text, position on the page etc is controlled by a file called style.css. This is a cascading style sheet file.

The Twentyten theme we are going to edit, has 18 content and structure files and four style sheet files. We wont be using all of these for this tutorial. We are only interested in two.

  • Main Index Template (index.php)
  • Stylesheet (style.css)

Accessing template files

There are several ways we can get at these files:

Any of those will do. But I’m going to work through on the assumption you are using the built in editor.

First thing to do is check you have the TwentyTen theme activated by going to Appearance >Themes. It should show Twenty Ten as the current theme. Then click through to the editor panel (Appearance > Editor).

The Theme editor

You’ll see a list of the 18 template files down the right-hand side and an editor window. By default this displays the Visual Editor Stylesheet (editor-style.css). All  you need to do is find and click Main Index Template or Stylesheet on the right to load up the files we will be working with.

Permission to edit.

When you look at the bottom of the editor window you may see a warning: – You need to make this file writeable before you can save your changes

You need to set the permissions on the theme folder!

This could be the biggest stumbling block of the process. But if you are serious about having a go at theme development, even tweaking like this, it’s worth getting your head round.

To remove the error message you need to set the permissions for the Twenty Ten folder to be 666.

Does that make no sense? You could try:

If you set the permissions correctly, the message should be replaced by a big Update File button.

You're ready to start editing!

Some final preparation

From this point I’m going to assume that you have a working installation of wordpress up and running. But before we experiment with the theme we need to have some content to work with. So if your blog doesn’t have posts yet you need to add a few posts to work with. You could do this manually using the lipsum.com, a lorem-ipsum generator and some liberal cut and paste for content. There are also a number of random content generator plugins available. For this exercise I used demo data creator.

We will also need to create some categories and assign the posts across the categories. I’ve used the following for this demo:

  • News
  • Sport
  • Featured Story

Once you have done that we are ready for Part 2 tomorrow, where we will start to edit the front page to get that magazine look.

As always, feedback and suggestions always welcome

Living stories comes to wordpress

You may remember a that Google trialed a bit of code with the New York Times and Washington Post called Living Stories:

Living Stories are a new format for presenting and consuming online news. The basic idea of a living story is to combine all of the news coverage on a running story on a single page. Every day, instead of writing a new article on the story that sits at a new URL and contains some new developments and some old background, a living story resides at a permanent URL, that is updated regularly with new developments. This makes it easier for readers to get the latest updates on the stories that interest them, as well as to review deeper background materials that are relevant for a story’s context.

It wasn’t long before the code became open source for people to tinker with. You need to be prepared to tinker a lot if you want to run it on anything other than Googles AppEngine (and even then you’ll be tinkering for a while). But now that tinkering may be over.

Google have announced the release of a special theme and collection of plugins that allow you to create a version of their Living Stories using WordPress as the base.

I’ve had a quick play and (once I got over a mistake with the installation. I’m a donkey!) it certainly makes it’s presence known. Look at the updated  dashboard!

The post page becomes redundant as you get a choice of a raft of different content types organized in to stories by assigning categories.

You start by defining a category for the story and then creating an event. You can then add other elements and, hey presto, it starts to package it up.

There is no fancy timeline but the way it breaks the content up would make for an interesting approach to group work on a project.

Worth a play.

HT to Charles Arthur (@charlesarthur) for the head up to this one

Enhanced by Zemanta

Digital job hunting

Last week I gave a short lecture to broadcast (and a smattering of magazine) students about using the web to help find a job.

I tried to sum the whole thing up in a pithy slide:

It was really about fitting digital in to an already well established pattern for job hunting – traditional ad’s with a good slice of what and who you know.

That’s why I started with a list of job sites offering a digital way of doing that long slog of working through the job ad’s.  No surprise there then.

But I made the point that looking for work in a converged world mean’t a bit of a change of perspective.

Even though you may come from a broadcast tradition and your target job may be in a traditional environment (radio newsroom for example) the market is increasingly varied. (as my highly technical diagram shows) Your skills carry across boundaries in a converging world. You could end up as a radio producer at a newspaper working on their podcasts or working for an online only publication working on video.

Increasingly that converged mindset is what you have to cultivate to get work. But I think it’s also  the mindset to apply for job hunting. Don’t limit yourself to one sector. Instead of starting in one of the circles, position yourself in the middle and aim at all of them. You never know what might crop up. So my tip around searching for jobs also included searching for jobs.

By searching for something like radio OR broadcast jobs UK you get a rich and broad pot that you can then start to refine and filter. To develop your searches, think laterally. Add phrases that are specific to your area of interest or that would be unique to a job : radio OR broadcast ~job +salary +enps uk.

Remember the aim here is not to get Google to simply churn out job ads; the jobs sites will do that. It’s also to introduce an element of serendipity in to the mix that will richen your understanding of the market.

Of course the introduction of a broader range of sites means more content to wade through so you’ll also need to consider ways to manage the flow. Simple things like setting up a Google Alert based on the search terms you enter can help. But you may also want to get your RSS reader working for you to pull all your job related feeds in to one place that you can search and filter.

If a speculative google search throws up an interesting company (who don’t have jobs but you might want to keep an eye on) then search for an RSS feed to subscribe to. Then when a job comes up you know what they have been up to.

When the orginal slides went up in a post on  journalism.co.uk, John Thompson pointed out a way to get custom RSS feeds based on custom searches.

In the top left-hand column on most of the pages on Journalism.co.uk, you will see a panel headed “Job of the week”. About half-way down there is a dropdown menu that allows you to search by job type. For this example, select “editorial assistants and trainees” and click “go”.

On the subsequent search results page, you will see at the top of the central column an advanced search form. This allows you to make a more detailed search based on sectors, categories, salary and location. You will also see an option under format to “return search results as RSS feed”. Select that and also tick “editorial assistants and trainees” under the “categories” section.

Click the search button and, voila, you will be presented with a customised RSS feed containing only editorial assistant and trainee vacancies.

Josh Halliday got in touch via twitter so say he has put together a combined RSS feed of popular job sites that you can subscribe to. (thanks Josh)

I’ve put together an RSS bundle of just five of the UK’s most comprehensive media jobs listings sites: GorkanaGuardian JobsJournalism.co.uk JobsHold The Front Page and the Editorial Jobs Twitter feed (it’s RSS is borked).

And don’t forget that there are other ‘oldschool’ ways. Sign up for email newsletters like the Gorkana alert

The Shmoozing bit.
In the media people will often tell you that it’s about who you know rather than what. So whilst the broad searching will tell you what jobs are available and give a broad view of what’s going on we need to get next to some real people.

At this point it’s worth stressing that this is not about using digital to replace the process. You still need to get out there and meet people. But we can build our own networks online that help us connect and experience the churn or views and news from the industry. It could be eavesdropping on the latest gossip to build up ‘intelligence’ or even using the community to help you get a job.

But if it’s about who you know, how do we know who to connect with?

This is where social networking sites like Twitter come in to their own. They offer an easy way to find and connect with people in your community. Take a look at MediaUK’s twitter page (@mediauk). Obviously a popular follow and the kind of thing that a lot of people in the industry would look at. Now we could go through the list of people that follow and are followed by @mediauk to find useful people; use their contacts if you like. But notice their lists

Mediauk's twitter lists

They are nicely split in to sections and make following a glut of people in your area easy. If you find someone on the list who really resonates with you or fits right in to your area then look at their lists (if they have them) and build your network.

The same logic (if not the same mechanics) work for other social networking sites. Take a look at LinkedIn or even Facebook. Connect with one person or join a Facebook group and you’ll open yourself up to more connections.

Of course, the key to success in social networks is to be an active part; Share, listen, help, participate. All of these things will build your profile. And profile is important as it doesn’t just build your recognition within the community (the most valuable part) but it also makes you more visible online.

The lists from mediaUK are actually generated from user submissions – you can go to their site and add yourself. That’s an easy way to be pro-active about building visibility. For some this might fall in to the ‘rampant self promotion’ section but it’s a way of getting your name out there.

That’s why I think a blog is still a valuable tool in your job searching kit.

Many people are leaving blogs behind in favour of the more dynamic ‘statusphere’ of twitter and social networks. But a blog offers something a little more stable, a more permanent place for you online. It offers you a chance to reinforce and expand your online identity. (I will always look at the link that people put in their twitter profile to get more information about a person.) To start with you could use it simply as a static CV/Portfolio site that you can point people to when applying for jobs. But it could soon expand to offer more. More active posting about your experiences and interests attract audience.

The most popular blogs within the journalism community tend to be the ones that share experiences – Think about Josh sharing that list of RSS feeds. It’s journalists trying things and showing their working out. Thats valuable to the community and people remember you for that (you’re playing an active role). That’s one of the reasons I linked to Adam Westbrook in the presentation. Like Josh, he’s a great example of someone who plays an active part in the community.

You could ask ‘why a blog and not a static website?’ My first response is that blogging is one of those things that you should have experience of in a converged world (back to my point earlier). But there are some, more practical reasons.

There are lots of great website builders out there (I’d add Jimdo to that list ), but blogs offer a lot of under the bonnet stuff that helps promote your stuff and make it easy to share. Built in notification of search engines and automatic RSS feeds are just two of the things that will help spread yourself around the web. They may be the thing that gets you popping up in a search engine when a prospective employer searches your name and it will link them to something that sells you appropriately.

Here’s a quick cheat sheet telling you how you can tweak a wordpress.com blog to start showing static pages rather than the more dynamic posts. You can change it later on when you are ready to go down the more dynamic posting route.

Given that this presentation was to broadcast students I also looked at the problems associated with multimedia on free sites and blogs. I’ve listed a number of third party hosts that you can try to get round some of those restrictions. Using a third party site also has the benefit of getting your work out there on another platform to another audience.

So, there it is. Use the web to sign up to job sites but don’t stop there. Use it to broaden your horizons, think multiplatform in where you look. Be part of and visible in the community and your profile will grow and that can only be a good thing.

I hope it made sense and if you have any questions then drop me a line.

Enhanced by Zemanta

Comment on paragraphs – WordPress Plugin

Last week I posted about a little wordpress plugin I wrote called FancyCatlist. It made a nice little category menu similar to the kind of thing you would see on Everyblock. I wrote it as part of the process of putting together one of the sites I want my students to use next year as part of their practice in online publishing. You can see it in action on the ‘work in progress’ site.

The site is a ‘beatblog’ kind of thing and in searching around for examples of different approaches to this kind of thing I stumbled back upon ‘community news engine’ Newsmixer.

Newsmixer.com
Newsmixer.com

Its a nice idea and especially impressive as it was a jschool project which you can find out more about on the site itself. But the bit that caught my eye was the ability to comment on each paragraph of the content (and more as you’ll see if you go and explore)

I liked that idea as it taps in to the ‘One Par. One fact’ discipline of  basic journo writing and turns it in to a kind of microlink activitiy. It also begins to stem ideas off from various parts of an article, not just an article itself. Of course the reverse is that it could abstract all meaning out of the text. But used well, as I think it is here, I think it stands up.

So I think to myself that this would be a nice feature to have on the students publication website. But not, in the first instance,  as a way of the reader leaving feedback but as a way for me to leave feedback. A way that I could comment on each paragraph to give students feedback on what they write. I should point out that as I write this, it’s the policy of the department to keep student publications behind a firewall (I’m not so happy with that but hey ho). So feedback in the open is not a problem.

Finding a micro-comment plugin

I had a look around to see what was out there that would do a similar thing. This included poking around the newsmixer source (which is opensource) to see if it was worth using their framework. But they are using python. Great but my head (and life) is too crammed to learn that. Ryan Mark, one of the developers of newsmixer, has announced that newsmixer is heading the way of an API and there will be a wordpress plugin to tap in to all the neat features. But that seems a way off.

The next thing I did was search for wordpress plugins.  The closest I found was marginalia which looks very nice but doesn’t seem to play well with WordPress 2.8 and even with some nice features didnt look like it would scale back to what I wanted.

So I wrote another plugin.

The Feedback By Paragraph plugin

Feedback by Paragraph is a plugin that does a number of things

  • It hijacks the content of the post, looking for the </p> tag and inserts some code that attaches a pop-up box to that paragraph so you can leave comments. It inserts a little bubble with a link to open the box which also displays the number of comments there already. It only does this on the article page (what WP calls a single post as defined by the template single.php). It uses the closing p tag because it’s the easiest one to find as the <p> is often full of crap like classes etc and my regex is not really up to that. Using </p> also has the advantage of picking up any image captions without breaking the styling class.
  • It saves any paragraph comments with a custom ‘comment type’ so that they can be associated with a paragraph
  • It filters out any paragraph comments from the normal comment display.
  • It only allows you to comment if you are an admin or the post author but anyone can see the comments.
Feedback By Paragraph
Feedback By Paragraph

You can see it in action  the beatblog site

An issue.

This is now resolved.

There is a big issue to be aware of with this plugin.  When you submit a comment form with a custom comment_type defined  it isnt processed like all the other form elements. I’m not sure why that is but it takes an ammendement to the one of the core files in wordpress to make it (at least that’s the only way I got it to work). That means a tweak to a file called wp-comments-post.php.

Around line 40 you need to add the line

$comment_type = ( isset($_POST['comment_type']) ) ? trim($_POST['comment_type']) : null;

And around line 62 you need to change

$comment_type = '';

to

//$comment_type = '';

I know, not ideal. I’m sure there is a better way to do this which involves hooks and filters and all that. Please if anyone has even half an idea how this might be done I’d love to hear. But I have yet to find it(or understand it).

How do I use it?

You can download the plugin to try.

What next

There is plenty of flexibility in this plugin and an options page wouldn’t go a miss. I’ll be looking at setting it up so that you have more control over who sees what and perhaps look at setting a template for the comments form so that it isnt hidden in the plugin code. But for now, given that my sites are behind a fire wall it seems to work for me.

Let me know if you download and try the thing. Oh, and don’t forget that tweak of the core file.

NOTE: First bug fix! This version makes the call to the database for the comments using the generic form rather than being hard coded to a particular table. Sorry!

Visit the feedbackBP plugin page

Enhanced by Zemanta

Fancy category list plugin for wordpress

An updated version of the plugin is now available with the links fixed

I’m in the process of putting together websites for the students to use this coming academic year and one of the things I wanted to try was a beatblog similar to the Everyblock style of site. So I’ve been playing around with wordpress and various plugins to build a site that is organised by ward and displays stories on a map. The idea being that it gets students playing with tags, geotags etc as well as helping them see how this kind of thing can be helpful for finding stories within their community (a skill much desired by the industry)

I’ll post more about my thinking and the practical process of the site as it beds in. But in the process of putting the site together I had a go at building a plugin (extra functionality for wordpress) which I thought I would share.

I’m a fan of the layout of Everyblock. It’s a great design. I particullay like the way they display the number of posts as a percentage of the total in a section with a neat bar graph kind of thing. It’s a quick way to pick out busy sections.

A visual guide to popular sections
A visual guide to popular sections from everyblock

So I thought ‘I’d like a bit of that kind of thing on the beatblog’.

With a bit of digging around I found a great tutorial by Wilson Miner, designer and co-founder of EveryBlock, on how those lists where made using CSS and ordinary html lists. Worth a look.

Having got it working within WordPress (a good deal of template bashing later) I thought it would be a perfect snippet to try and make in to a widget so that I didn’t need to hard code it in to the pages. Which, thanks to a great tutorial by Tim Trott on how to make wordpress widgets, I have done.

The fancy category list widget
The fancy category list widget

And in the spirit of these things,  here it is for you to try if you want to.

You can see it in action here (warning:this site is under development so don’t be alarmed if it looks odd)

How to install

The file contains a folder called fancycatlist. Put the whole folder and its contents to the plugin directory of your wordpress isntall and then activate the plugin in your wordpress back-end.

The folder contains two files. The actual plugin file (fancycatlist.php) and the style sheet that does most of the layout work for the list (fancycatlist.css). If you want to make major changes to the look and feel it’s the css file you want to be tweaking

Once it is installed you’ll find that you have a new widget called Fancy category list.  It’s meant to be used in the sidebar.

Settings

The widget has a number of settings

  • List title: This appears above the list in the Leave it blank and nothing is displayed.
  • Parent category ID: This restricts the list to show the categories in a parent category. So in my install I have all the ward categories under a parent category called Wards. Leaving this blank will list all the categories on the site that have a post assigned. Empty categories don’t show up.
  • Style information: These boxes allow you to customise some of the look and feel. You can change the colour of the category text, the bar behind , the number of posts and the roll-over colour.

Pretty straightforward I think.

The result is something like this

The fancy Category list
The fancy Category list

How it works

The plugin works by counting the number of posts published on your blog and then working out what percentage each category accounts for to generate the bar.  It then generates a standard list of the results and applies the CSS required to make it look nice. So the truth is that its not entirely accurate to the section (especially if you use the parent setting) but I needed a ‘grand total number’ to work with.

What’s next

To be honest probably nothing. If I was to take it any further it would probably be to give the option of it displaying little sparkline style graphs. It could also do with setting up so that you could have multiple instances of the list and a few more settings. I’m also sure that the CSS would have some proper hackers spinning on their chairs. But it works for me and it looks not-to-bad on most installs.

If you get some use out of it or change it, let me know. It may not say it in the files but the stuff is there for you to do with what you will. If you make millions off of it then rememeber me in your will.

Notes etc:

Notice I said ” can be helpful” when talking about using the web to help cover communities. I don’t think it’s a replacement. No one in their right mind does. So please don’t hassle me about killing traditional reporting.

If enough people are interested I can write a post about how I made the actual plugin. But I have to say that everything I learned came from Tim’s post.

Interesting things for the day

Much as I hate my first post for the new year to be a link list I’m elbow deep in marking at the moment. So here is what I’ve found interesting today.

Business Models for news online - Paul Bradshaw shares a recent presentation and jolly good it is to.

Amani Channel has decided to focus his Urban Report podcast on media production. I like the cut of his jib. And if tech is something on your list to engage with this year then you could do worse then look at Chris Amico’s wiki-like Tools for news

Ten questions for journalists in the era of overload – Matt Thompson poses some interesting questions to ask as we move in to a tough year. Think of them as self-diagnosis

George Hopkin pointed me a the announcement from Nintendo that they are starting a TV channel for the Wii. Considering the broad appeal of the platform this could be the trendsetter moment.

From games platforms to blogging platforms. Over at ZDNet Zack Whittaker seems a little behind the curve with Journalism vs. blogging: the present and the future but there are some interesting asides in Zack’s interview.

If WordPress is your blogging platform of choice, then how about a facelift? Try this list of  wordpress themes. But if you’ve moved to the new version of WordPress over Christmas then Mindy McAdams has a nice post on dealing with the new dashboard. The post also touches on students blogging which gives me chance to point out a nice post from Alf Hermida, guesting at media shift, about the value of blogging in Journalism education

Talking of Journalism education, Mark Hamilton has a great post offering “A few thoughts for my students before heading back to the classroom”. All my students will be seeing this when they get back along with the widely circulated ( Resolutions for journalism students from Suzanne Yada.

Mark Luckie over at 10,000words kept me busy this afternoon following a raft of new people as he updated his 10 Journalists you should follow on Twitter which I feature in at No 5, which is wrong for so many reasons, not least because of those who aren’t. But I’ll bask in the kudos and say hello to all those new followers who have made it this far. The post is worth a look for the comments where the decidedly male bias has started an interesting discussion. My wife would say it’s the slightly obsessive/compulsive nature of the male of the species that means there are more of us online.

Still, male or female,  there are more and more of us online as we enter the new year and in the Andy Burnham, our Minister for Culture, has stirred a little mumbling with his idea of ratings for the web. Steve Bowbrick has a great take on this as he focuses on the idea of filters  “What we should do in response to Burnham’s reflex rejection of the net’s openness and permissiveness is get on and provide the filters people need”. He is right and, as many have already said,  it should be one of the things journos look to add to their tool belt.

Of course journos have a lot to think about in the coming year. Over in the US the amount of good news seems in short supply as Jeff Jarvis (and the inneviatable comment discussion afterwards) proves. In the UK, blogger Fleet Street blues has some comparably dire predictions for 2009 including the prediction of a Mea culpa moment.

You can’t keep cutting journalists and demand ever more from them without something cracking. Yes, reporters make mistakes all the time. But expect something spectacular to emerge next year, a mistake, accidental or otherwise, so unavoidable that news editors the length and breadth of the country will have to sit up and take notice. Britain’s Jayson Blair, if you like.

Scary but it has a ring of inevitability about it. But finally, and more positively, Shawn Smith has a great post (and a kind of companion for Suzanne Yada’s post) Forget Survival: The Journalist’s Guide to Owning 2009 and Beyond. I love his starting point

Journalism is NOT dependent on the fate of your employer, newspapers or mass media. Rather, YOU can help decide journalism’s future.