Displaying multiple pages on one

Every so often I come across a theme or an implementation I like and wonder how it is being done. I like to dig behind the scenes on themes and see how they do things. Taking things apart to see how they work is a great way to learn.

One neat little tidbit I learned was how to create a page template that can use content from other pages and append it.

The steps

  1. Write code
  2. ???
  3. Have a celebratory drink

Step 1: Write Code

Yes, we will be writing quite a bit of it. Okay just enough to get the ball rolling and demonstrate the concept. One of the first things we need to do is figure out how many pages we want to show on our page template. I’ll use a smaller number like one to get started. You can add more if you want but because this is for demonstrational purposes we’ll keep it nice and simple.

So first, we will create our setting in the customizer:

$wp_customize->add_section( 'my_theme_page_sections', array(
	'title'    => __( 'The first page', 'text-domain' ),
	'priority' => 130,
) );
$wp_customize->add_setting( 'my_theme_page_1', array(
	'default'           => '',
	'sanitize_callback' => 'my_theme_sanitize_dropdown_pages',
) );
$wp_customize->add_control( 'my_theme_page_1', array(
	'label'             => __( 'Page 1 content', 'text-domain' ),
	'section'           => 'my_theme_page_sections',
	'priority'          => 30,
	'type'              => 'dropdown-pages',
) );
// the sanitize callback
function my_theme_sanitize_dropdown_pages( $input ) {
	if ( is_numeric( $input ) ) {
		return intval( $input );
	}
}

Next, we can create our actual page template.

/**
 * Template Name: Multiple pages
 *
 */
get_header(); 
	while( have_posts() ) : the_post(); // beginning of the loop
		// The page content of the selected page.
		// something basic can work like 
		the_content();
		wp_link_pages();
	endwhile; // end of the loop
	// Here is where the fun part is!
	rewind_posts();
	my_theme_selected_pages();
get_footer();

Yes, I’ve left out a lot of the markup but that’s only because the styling will be different for everyone. As you can see the part that creates the extra content is the function my_theme_selected_pages. That means we have to create this function somewhere. It can look something like:

$page_1 = intval( get_theme_mod( 'my_theme_page_1', '0' ) );

if ( 0 == $page_1 ){
	return;
}

for ( $number = 1; $number <= 2; $number++ ):
	if ( 0 != ${'page_' . $number} ) :
		$selected = new WP_Query( array( 'page_id' => ${'page_' . $number ) );
		// Our newly created loop with our selected page(s)
		while( $selected->have_posts() ): $selected->the_post();
			the_content();
			wp_link_pages();
		endwhile;
		wp_reset_postdata();
	endif;
endfor;

As you can see I have made it super simplistic. You can add more pages if you want. The key is making sure that $number<=2 matches the right amount of pages you want to add. So if you wanted to add five you would change the 2 to a 5. Yes, I left it at two because I forgot to change it.

Step 3: Celebrate!

Okay, maybe style it up if you want but I’m going to celebrate with some coke zero.

Making a Portable Object Template for your WordPress theme or plugin

Yes, a bit of a lengthy title but I feel will get the point across and it is after all what I’m wanting to share with you today.

A what now?

A .pot ( or a Portable Object Template ) file is what WordPress uses and many PHP programs use for translation purposes. There are three files used. According to icanlocalize.com the files are:

  • MO – Machine Object. The MO file includes the same contents as PO file. The two files differ in their format. While a PO file is a text file and is easy for humans to read, MO files compiled and are easy for computers to read. Your web server will use the MO file to display the translations.
  • PO – Portable Object. This is the file that you receive back from the translators. It’s a text file that includes the original texts and the translations.
  • POT – Portable Object Template. This is the file that you get when you extract texts from the application. Normally, you send this file to your translators.

The one we will worry about is the last one. The POT file. There are several ways to create this file but the one I’ve found most useful was the one Otto was awesome enough to post for theme reviewers. It is super simple and does need a little tinkering and getting over the fear of the command line.

Yes, the command line. You know that little program that uses only text. No, not a text editor. Would be cool but no. Depending on the platform you are using it will be called a terminal window, command prompt or even powershell. All of these will work for what we will be creating.

Steps and requirements

Sorry, did I not mention there would be some requirements? The basic requirement is the command line and having PHP installed. The next would be getting the needed files from the repository. If you aren’t developing themes using a development version of WordPress leave your address in the comments below, I will find you and I will hit you. Hard. Even a release candidate is worth your investment unless you like to break things and have people yelling at you.

The tools and files you will need are in one of two locations. The first being in the svn developer site. You will need some sort of SVN software in order to get it, of course. The other would be from my github repo I created and modified. Yes, I created it just for this reason.

So the steps are as follows:

  1. Get files
  2. Extract files to correct folder
  3. Open command line
  4. Do some magic – or Voodoo, your choice
  5. Do happy dance!

Getting the correct files

I mentioned and linked two places where to get the needed files. The github link is the one I will go over. Part of that reason is not everybody will be fully familiar with version control or comfortable enough to not break things. Once that is downloaded we can open the zipped folder and move on to the next step!

Extracting the files

This is super simple thing to do. Extract the files to the root of your WordPress folder. It should look something like the image.

WordPress folder
WordPress folder

Open the command line

Now, there are several tools that are available for this. For Windows user there are two that I will often switch between: command prompt and powershell. I like using powershell more. We then will change to the directory where we have our WordPress installation.

For the next step will be going over some code, so be prepared.

Doing the magic

So here is where the real magic will happen. Once we are in the folder of our installation we will once more change directories to the i18n folder where all translation files reside. From there we will run a quick line of code that will create our new POT file.

$ php makepot.php wp-theme /path/to/theme /path/to/languages/theme-slug.pot

The thing to keep in mind is the $ is just a placeholder for the current directory you are in. It may differ from machine to machine. Once we have run that it will create a new file ( theme-slug.pot ) with all translation-ready strings. So try not to forget to translate all text strings!

How it works

I know there are a few people wondering how this actually works. I know I was for bit. I’ll try my best to make it a little more understandable why you need to have certain things in your command line.

The first thing you need to know is what you are doing. When you state php you are to a degree saying, “I want to run PHP code and use this file.” The next three things are what you are going to pass that file.

  1. The first thing we passed is what type of project you are creating the pot file for. In our case it is a wp-theme. There are a few other you can decide from like wp-plugin, wp-admin, wp-core and a few more that I just won’t list.
  2. The second thing we passed is the location of where to look for the translation functions. If you read through the list of what functions it looks for you are in for a treat because that list you can add to Poedit. (I’ve slowly walked away from that but would still recommend for beginners.)
  3. The last thing is the output of the file. Both the location and the name ( be sure to include the extension as well ) are what we will be using.

Now, you can do this with your plugins as well. Just be sure that the folder you are creating the POT file to does exist otherwise you will get errors and it won’t create the file for you.

I stated earlier that it works with a few changes; it’s true. The reason being I know there are some people who don’t like to use a development version of WordPress. Why? I don’t know but I made a few tweaks for it to work the way it works. Okay, I only changed three things but it works for the time being. I say that only because I’ve tested it on/off since the original post. If you encounter any issues please be sure to let me know!

Celebration will begin

There we have a newly created POT file ready to be sent to a translator. So, yes, by all means do your happy dance. Not only did you get over the slight fear of the command line but you possibly learned something new along the way.

Notes

If you don’t specify a path of where your theme/plugin resides it will create an error and will not work!
If you don’t specify a path, just a name for the file it will create the file in the i18n folder.

Keeping count of reviews

I hate posting this but I have to do it; sort of a status check for myself. To see where I stand and where I can be better. We all do it. I choose to do it publicly.

I can’t recall when I said I wanted to have my review count to be at 500 by the end of the year but I did. What review count you ask? Theme review of course. Since the beginning of the year I wanted to allot more time to reviewing and helping release more themes.

I can’t help it, I like to help when I can. It hasn’t been easy for me only because of the way I try and balance work and everyday life at the moment. I get home from work and I just want to review more themes when I should be sleeping.

As of this writing the tally is around 330 themes that I’ve looked over and read just about every single line of code. There are some that I glance over but for the most part I read all the code and of course look for key things when it comes to new themes.

I’m glad I’m keeping a good pace so far and will try and post an update when I finally reach that 500 theme mark.

Making a few commits

Let me give you a little bit of a back story first.

2 years ago

I began posting on the WordPress.org forums to help people out. I would only post on things that I knew for sure I knew the answers to or would help out. It felt like it at the time. Who knows really. It was, after all, two years ago. Not only that I would only really post at most twice a week. It was fine only because I didn’t have a goal in mind.

Yes and no. I had a goal in mind: to help; to share my knowledge. A lot has changed since then of course. Now, I have a slightly different goal in mind: make a career out of helping people. Yes, it may sound a little cheesy but it is true. A lot of it does stem from working at Starbucks. Many of the ‘regulars’ know that I won’t lie to them and will try my hardest to find something they will like. Now, I’m getting a little sidetracked.

Push forward

Over those last two years I kept mentioning a theme I was working on. Funny thing is I did and I didn’t. Part of that reason was I kept putting it aside. I would do a theme review, post a solution to the forums or see how I could help out somebody in the IRC channels. You know what? I loved every encounter and every sentence I wrote and read. So really it’s hard to be upset. I learned a lot from it all. Not just WordPress but programming in general.

Yes, I did also pick up a few other things along the way like the basics of SVN and Git and how to create a simple repository with those tools.

It’s safe to say the last two years I have been fairly busy. I have reviewed more themes, posted more often on the forums, make an attempt to post on IRC more frequently and have the honor of being one of  the Theme Review Team reps. It’s been an awesome year for me so far.

Say what?

Up until recently I never really said much about my theme. Yeah, I posted one or two photos of what it might look like but never any code. Okay maybe some code but never really said it was.

I began my theme with one thing in mind: simplicity. It sounds overly repetitive since a lot of themes claim the same thing. You know what? That’s fine. Over time I realized one thing: I don’t want complete simplicity. It would be nice to have but I don’t think I would achieve it without deleting the entire project. I mean how much simpler can you get with no code?

So, here goes, what I have been working on/off for the last year or so: Solea

Yeah, it’s not finished. There are a few things missing here and there but you know what? It can be expanded upon.

Child theme friendly post-formats

It’s no surprise I will always preach the making of child themes. Part of the reason is because you can make modifications without losing all that when it comes time to update the parent theme. I mean nothing more exciting than having to recall what files you changed, what code you added, deleted to brighten your day. Troubleshooting. It’s amazing.

The dilemma

Currently the biggest issue I’ve really seen is post formats. It’s not really easy to add to the parent theme. I mean yes and no. Adding to the list is not entirely possible without some parent theme editing and that is what I actually did. I created a quick function that checks and adds to the list of post formats.

The code

function get_theme_post_formats(){
    // $core_formats = array( 'link', 'chat', 'quote', 'gallery', 'status', 'image', 'aside', 'audio', 'video' );
    // base support for the theme
    $formats = array();
    // child if it wants to add
    $child_formats = apply_filters( 'theme_post_formats', array() );
    foreach( $child_formats as $key => $format ){
        if( ! array_key_exists( $format, $formats ) ){
            $formats["$key"] = $format;
        }
    }
    return $formats;
}
add_theme_support( 'post-formats', get_theme_post_formats() );

How it actually works is pretty nifty. What those fourteen little lines of code does is create a filter for child themes to use. That filter is: theme_post_formats. What you would do in the child theme’s function file is something like:

add_filter( 'theme_post_formats', 'child_formats' );
function child_formats(){
    return array( 'link', 'status', 'gallery' );
}

What that will do is add to the list of post formats of the parent theme. The way WordPress core makes you do it is by re-declaring the formats. What I mean by that is you have to call the function add_theme_support and list the already supported formats and add. Seems like a little too much work for some. At least how I feel about it; some may or may not agree with that.

To show you what I mean:

// Parent theme declaration
add_theme_support( 'post-formats', array( 'link', 'gallery', 'quote' );

// Child theme declaration
add_theme_support( 'post-formats', array( 'link', 'gallery', 'quote', 'status', 'chat' );

As you can see both can work. What it boils down to is how you want people to extend to your theme.

Getting the image count in WordPress

A long time ago I had a bit of an issue on how to get the image count from a post. At the time there wasn’t a way that I could think of to properly getting all the needed information; but then again I didn’t know as much as I do now.

I wanted to revisit this because I know it will help out at least one person if not more.

Since the last time I brought up the topic of multiple galleries in one post a lot has changed and a few new functions were added to help solve the dilemma. The key one that helped is: get_post_galleries

It was a simple idea but for some reason at the time it kept only giving my brain a beating. The reason was because it wouldn’t give the correct image count.

New solution

Up until now I was a little confused how I would solve my issue. I knew I needed to get all the galleries and then I needed to get all the images in those galleries. So, here is what I did:

// Get all the galleries in the current post
$galleries = get_post_galleries( get_the_ID(), false );
// Count all the galleries
$total_gal = count( $galleries );
/**
 * count all the images
 * @param array $array The array needed
 * @return int returns the number of images in the post
 */
function _get_total_images( $array ){
    $key = 0;
    $src = 0;
    while ( $key < count( $array ) ){
        $src += count( $array[$key]['src'] );
        $key++;
    }
    return intval( $src );
}

echo _get_total_images( $galleries );

As you can see it really isn’t much code. Part of that reason I wanted to keep the code as simple as possible. Feel free to extend it. In fact, I encourage you to do it.

How it works

What’s nice about the way I went about it is that it will require at least WordPress 3.6 and higher or else you will get an error. Nobody wants those, right?

The first thing we did was create a holder for all the galleries with the get_post_galleries function. We then count how many galleries there are and store that in another variable. That way we can use that later on to output the number if we want. Some people like that sort of thing.

Line 10 is where it goes a little different. I know you’re wondering why I’m declaring a function and then echoing that function in the last line. Part of that reason is because I wanted the ability for child themes to easily filter the text that I would use. Yes, I am aware I didn’t include any text strings. I’m pretty sure you can guess what it would say though, right?

Now, with that little tidbit in your arsenal go and read some code from the includes folder. You won’t be let down.

You don’t know text

Okay, maybe you do but what I’m talking about is a different kind of text. I’m talking about text strings in PHP code.

Text strings

What are they? Why do they matter? Well, they matter in themes that you want to make public or share. Oh, and plugins as well, I guess. If you’re into that sort of thing.

Over the last few weeks I’ve come across a few themes that didn’t quite make every line of text translatable. It almost drove me mad. Seriously. I was about ready to just punch my monitor. Thankfully another song came on and I was back to my calm self.

Functions

Yep, they do exists within WordPress. It’s actually quite nice that they do. Here are some that can be found in the includes folder:

  • __( 'I am a text string', 'theme-domain' )
  • _e( 'I am echoed', 'theme-domain' )
  • _x( 'Form', 'Art related', 'theme-domain' )
  • _ex( 'Form', 'Filing related', 'theme-domain' )
  • _n( 'Single', 'Plural', 'Number', 'theme-domain' )
  • _nx( 'Single', 'Double', 'Number', 'theme-domain' )
  • esc_attr__( 'I am an attribute', 'theme-domain' )
  • esc_attr_e( 'I will be an echoed attribute', 'theme-domain' )
  • esc_attr_x( 'Link', 'hyperlink', 'theme-domain' )

There are a few more but those are some of the ones I feel would be used more often than the others. In particular the first two. Those are by far the easiest ones to really miss. At least those are the ones I seem to find not being used when they should be.

What qualifies as a string?

When it comes down to it: anything that is inside markup. If it is wrapped inside an HTML tag then odds are it is a text string. A great example of this would be a very common line used by many themes. The “posted on” phrase. Now, there are several ways of doing this but I feel there are very few that are correct when it comes to translation strings.

$phrase = 'Posted on %s by %s';
printf( $phrase, get_the_time( get_option( 'date_format' ) ), get_the_author();

As you can see from the example I’ve provided it is a simple phrase that can easily be translated. The only thing you really have to do now is wrap the actual phrase with a translation function like:

$phrase = __( 'Posted on %1$s by %2$s', 'text-domain' );
printf( $phrase, get_the_time( get_option( 'date_format' ) ), get_the_author();

Fairly simple, right? But what about when it comes to numbers? That is what _n() is for actually. It’s a neat little function to use. It compares numbers! Yes, numbers. I love those things.

Okay, not literally compare numbers but fairly close. What it does do is actually determine which version of string to use. Sort of a juggling function with a twist. Really cool to use when you want to compare a single use, plural or even more.

A good example would be using it in a shopping cart.

echo "<h4>Items in cart</h4>";

$count = _n( 'Only one so far', 'Two items', get_total_items(), 'text-domain' );
printf( '<div class="cart-total">Currently: %s</div>', $count );

Pretty neat, right? I think so.

There are a few more functions to make translating a theme, or plugin, better but I feel those are the ones I find a bit more useful.

Dealing with menu items

I feel as though this subject is a bit different than what I’m used to.

To a certain degree it is. I’ve never really dabbled much with the menu class within WordPress. I mean I used the wp_nav_menu template tag once or twice but never really looked as to how it works. That was until a few days ago when I saw something that really made me wonder. I had to ask myself the question of how to do it.

I, of course, turned to Google and looked for a tutorial or two. That was after I looked at the code for the menu class. ( Which can be found in the wp-includes folder )

I’m not going to lie when I say that I was a little confused by the code. The main reason being that it is so much of it. That and I really just skimmed it rather than actually tried to process the code. I know. I know. I need to read the code.

The reason

I bring this up because when I saw those little words on my computer screen I really had to do a bit of a double take. I had to look up and see if any theme had support for a menu description. Throughout all the themes I’ve had a chance to review and all the themes I’ve come across I don’t think I ever really got a chance to experiment with that feature.

Yes. A feature. As it turns out not many themes are able to–or do really–have that support.

How?

I wondered about how I could do this without having to deal with a lot of code. After all it should be simple.

Right.

At least I like to think so. I did some reading and some experimenting and I wanted to share some information.

The method I liked best.

I mean, after all, in WordPress there are several ways of achieving the same result. The one I want to share is a really simple one. All you are adding is about eight lines of code. Very simple, right?

So here goes.

class Descriptive_Menu extends Walker_Nav_Menu {
    function end_el( &$output, $item, $depth = 0, $args = array() ) {
        if ( $item->description ){
            $output .= '<span class="menu-description">' . $item->description .'</span>';
        }
        $output .= "</li>\n";
    }
}

Seems a little odd? Not really.

Let’s walk through what it is doing, shall we?

The first line is actually extending the Walker_Nav_Menu class and we are really doing is appending a span tag just before the end of the list item ends. But we are only doing that if there is a description available.

In order to have a description you go to the Menus screen, expand the screen options and make sure you have “Description” selected under the “Show advanced menu properties” section.

Now, in order to show it you will have to add one minor thing to wp_nav_menu. In the array you will want to add:

'walker' => new Descriptive_Menu()

So go on. Try it out. Experiment by extending certain parts of the Walker_Nav_Menu like start_lvl, end_lvl, or even start_el.

Playing nice with plugins

Yep, you read that right. Playing nice. With plugins. I know what you’re thinking and are probably wondering what I mean by that.

Don’t lie

You know you want to ask. What do you mean by that?

What I mean is that as a themer you shouldn’t be adding frivolous things to your theme. What I mean by this is things that add content or completely alter, and manipulate, content. Things like sharing buttons, meta boxes or things that a user may end up losing once the choose a different theme. That is what I mean.

Background

What really brought this up is a change in guidelines to the theme review. It has been around but up until recently has been more enforced than before. At least from what I’ve noticed.

jetpack-sharing

Recently, I did a review where the developer used plugin functionality in the theme. Mainly the sharing buttons. I know, I know. Everybody loves to share their content. But the thing is when I switch a theme I want those buttons to stay where they are and not move around on me. A good portion of the time they reside towards the bottom of the post. As noted by the quick screenshot. That is using the Jetpack plugin’s sharing module, for demonstration purposes of course.

social-sharingJetpack is a great plugin and does the job for me and a few others. But what about those that append their sharing options to the content. It can look a little funky. A great example is the image on the left because it shows simple content but it showcases the issue I’m more concerned about fixing.

What is the issue?

The issue is that when you have content that is paginated the sharing icons get right in the middle of it all. As you can see the real content of the post ends with “Post Page 1” but can continue to page 2 and then three. It creates a separation that can ruin almost any design.

Now, I know what you’re probably going to say. But Jose, that’s a plugin. My theme handles it better. Of course it does. The theme developer chose the placing of the elements and how to display it. But what if you are a new user and are using a plugin? Looking at the second image you can see what can happen. To me it does look a little odd having sharing icons in between.

A better example is the default theme Twenty Fourteen. I wanted to use it because I do like the way it looks but when it came to displaying the post pagination it didn’t look right to me.

default-sharing

As you can see it almost feels like the content gets cut off. Yeah, I know it does seem a little picky but when you want to share a theme with many people you have to think about who the end-user really will be. It reminds me of a talk Nikolay did in WordCamp SF. Made me think about who will really be looking at the code.

How to solve it

What’s really funny about how I managed to resolve this issue, at least for me, was by thinking about when that social bar gets added. Now, do keep in mind I do use Jetpack on this site and try to test with it on a local setup. This is where the playing nice with plugins comes into play.

Notice I install the plugin and add styling and functionality to it rather than create my own? That is the way any theme developer should be creating any and all themes. Whether personal, for fun or commercial.

Currently I’m trying to redesign my site, of course, and have at least one post that is split up into more than one page. While that is sort of an edge case it does represent a bit of an issue that I would like to discuss.

The first thing I did of course was turn to the code. The first file I looked at was the Jetpack PHP file to see what things were being loaded. I noticed that Jetpack uses modules so I went ahead and skipped straight to the sharedaddy module. Started looking at the sharedaddy PHP file and it led me to the sharing file. Then the sharing service file.

You’re sort of wondering where this is going right? Thankfully that was the last file I really needed to see because towards the end of the file there was a line of code that was music to my eyes.

add_filter( 'the_content', 'sharing_display', 19 );

What that meant was that I could add a filter to the content and add a priority greater than 19.

Enter the code

So in order to add to the content I needed to filter the content and add to it. What is nice is that we can easily do that with a simple call. By using

add_filter( 'filter_name', 'function_callback' );

I managed to get the result I wanted and was so desperately looking for. The code I used is actually quite simple. I think that is part of the reason I’m shocked it worked the way it did.

// Append linked_pages if any are available
add_filter( 'the_content', 'my_theme_add_pages' );
function my_theme_add_pages( $content ){
    // Get the markup
    $linked = wp_link_pages(
        array(
            'before' => '<div class="page-links">Pages: ',
            'after' => '</div>',
            'echo' => false,
            ) );
    // If there is any markup append it
    if ( $linked ){
        $content .= $linked;
    } // otherwise we just return the regular content
    return $content;
}

Simple right? What really makes this work is the last key in the array. The echo key and setting it to false so that it won’t output any code and stores it to the $linked variable. Then a quick check to see if there is anything and if there is concactinate to the $content. The next step is styling it to give it some room.

personal-adjustment

As you can tell I still have some styling to do but now my post/page navigation links don’t appear after my sharing icons.

So you want to become a WordPress Theme Reviewer?

What does it take?

Some PHP, JavaScript, HTML, CSS knowledge and a little bit of time to spare. At least that is what it takes to get the ball rolling.

Yeah, very simple. Doesn’t take much really.

The basics

There are some things that you really have to know in order to becoming a WordPress Theme Reviewer. Here is a quick list I feel makes for a good theme reviewer.

  • Knowledge
  • WordPress prowess
  • Personality
  • Time
  • Communication

Now, that is what makes for a reviewer but how to get your foot in the door?

Those steps are a little bit easier. One of three ways to get started really. The first one is by requesting a ticket to review from the review queue. [note: it is as of this writing]

The second way is by emailing the theme reviewers mail list and asking if any new theme is available for a review. Keep in mind that you will have to subscribe to that list as well in order to keep in contact with all theme reviewers and admins. You can also follow a good few through twitter, personal blogs or however you’d like.

The third way, but is less frequently checked, would be through the IRC channel #wordpress-themes. They will also link you to the review queue I mentioned earlier so these last two would be just pushing it if you did all three. Just saying.

What next?

The next step would be to setup your testing environment. Getting all the needed information, the settings and finally testing the theme. How you set that up is entirely up to you but there are some things that must remain the same across all the testing platforms. Can you guess what that is? It’s a simple setting that will help solve some of your headaches.

It is setting WP_DEBUG to true in your configuration file. Yeah, a very simple thing, right? Keep in mind that there are other ways to keep track of errors as well.

As far as plugins go, there are plenty to pick and choose from. The widely accepted one is the developer plugin by the Automattic team. It is a great plugin to get you started in creating a theme or plugin.

Testing

Yeah buddy! Finally we can discuss testing the theme. In order to test a theme you need data. Enter the theme unit test file. There are a few places that have some sample posts and images that you can download. Just a simple XML file that you import. Thankfully there is one that is widely used by many theme reviewers. The file stays up to date and is looked over every once in a while for errors.

An alternative is to use your own posts if you have enough. I may one day try creating my own little set of posts but for now I use the theme unit tests provided. It’s convenient if you are just starting out.

Unit Testing

Simple. Follow the steps provided in the theme unit test page and then report any major errors in the theme’s ticket.

Go through each scenario and make sure you write any, and all errors that you encounter. Keep in mind that is only part of a review. There is one part that I feel is extremely important. Communication.

Let’s talk about it

Yes. Talking is the single biggest thing when you are reviewing a theme. Without talking to the theme developer neither one of you is learning or even progressing. I mean it. Keeping in touch is the key to becoming a good theme reviewer as well as a developer.

A great example of this would be a ticket I reviewed nearly four months ago. I assigned myself the ticket, looked over the code, tested to see if anything would break and took note of it all. I posted the required things that needed to be addressed in order for the theme to be approved.

I didn’t hear any response from the developer in three days. I posted a question asking if they needed more time. Still no response. Nearly a week later I told that person I had to close the ticket and not approve the theme. About a week ago I was on the support forums and saw that somebody had a question about the theme and if there would be an update, if any. Made me sad to see that.

Personality?

Yes. It does take a certain personality to be a good theme reviewer. At least I think so. The reason I say this is because as a theme reviewer you are helping somebody. You are helping them share something with the world. I know it does sound a little cheesy but it is true. Think back to when you were in school and you had to create something for a class project. Odds are there was at least one person in that classroom that got all the recognition and all the praise for going above and beyond what the project asked for.

Now put yourself in their shoes ( if you weren’t already that person ) and think about how it feels. It feels good. It makes me happy approving a theme. At least one that I feel is worthy of approval but that’s another topic.

Think you can?

So, you ready to become a theme reviewer? If so, then head over to the Make Theme blog, give some input, ask for a ticket and give back to the community!