It makes us very proud to hear that our WordPress tutorials inspire many readers to consider developing their own themes. For the users who just want to tweak their themes, we have a WordPress theme cheat sheet. However, some of our readers want to go beyond that and create their own themes from scratch. One such user recently asked us how to add dummy content in WordPress for theme development purposes. They were using a plugin to add dummy posts in WordPress, which is not an ideal solution. In this article we will show you how to add dummy content for theme development in WordPress using theme unit test data.
What is WordPress Theme Unit Test Data?
Theme unit test data is an XML data file that contains dummy content for WordPress theme development. It is used by WordPress theme developers to test their themes. It is also used by WordPress theme review team to test the themes for inclusion in WordPress theme directory.
When creating a WordPress theme, there are a number of things that you need to consider such as images, links, widgets, post formats, galleries, lists, comments, page navigation, etc.
You need to make sure that your theme is ready for all these elements that a typical WordPress site is supposed to handle. Theme unit test data helps you test your themes for HTML tags, formatting, navigation menus, comments, widgets, etc. This allows you to create a theme that is truly compatible with WordPress. It is extremely important to test your theme with theme unit test data when you are planning to publicly release a theme.
If you don’t like the video or need more instructions, then continue reading.
Adding Dummy Content Using WordPress Theme Unit Test Data
First you need to download the XML file for theme unit test data. Go to Tools » Import in your localhost development environment. On the Import screen, click on WordPress and a new popup window will appear asking you to install the WordPress importer plugin. After installing and activating the plugin, you will be redirected to the importer asking you to upload a WXR (.xml) file.
Upload the XML file you downloaded earlier. On the next screen select the authors you want to import and download attachments. The importer will now import the data from XML file to WordPress. Once it is done, preview your site to make sure that all new content is there.
What’s Included in Theme Unit Test Data?
Everything that you would need to test your WordPress theme is packed in theme unit test data. It has categories, child categories, menu items, nested comments, pages, sub-pages, images of different sizes, image alignment, etc. There are lists, blockquotes, links, code, and other HTML tags that you should style in your themes. It is a comprehensive set of dummy data which is far better than using a dummy content generator plugin for WordPress.
We hope that this article helped you add dummy content for theme development in WordPress. If you have any questions or feedback, then please leave a comment below. Also don’t forget to follow us on Google+.