# WordPress Tips: Test your theme with Theme Unit Test and Monster Widget

## Метаданные

- **Канал:** Corey Schafer
- **YouTube:** https://www.youtube.com/watch?v=eGT0Z3oafFA
- **Дата:** 26.11.2014
- **Длительность:** 9:00
- **Просмотры:** 8,478
- **Источник:** https://ekstraktznaniy.ru/video/12815

## Описание

When I first started developing WordPress sites, I found myself constantly adding dummy data so I could get an idea for how specific elements would look with my theme. Manually adding dummy data was not only slow, but it was also easy to leave out a lot of different test cases.

In this video, I'm going to show you a great way to add sample data to your WordPress site with Theme Unit Test and the Monster Widget plugin.

The Theme Unit Test data and Monster Widget plugin are two great ways to see how your theme visually handles a variety of content.


✅ Support My Channel Through Patreon:
https://www.patreon.com/coreyms

✅ Become a Channel Member:
https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join

✅ One-Time Contribution Through PayPal:
https://goo.gl/649HFY

✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey's Public Amazon 

## Транскрипт

### Intro []

hey how's it going guys i want to show you a quick tip on how to bring in some sample data into a fresh installation of wordpress this is great whenever you're developing a site locally and you need to see what your theme is going to look like whenever it encounters certain types of elements in a post you know you could have images you could have image galleries you could have quotes or tables a lot of different things that you might not think to test whenever you're developing your site that could show up on your main blog down the road and it might not look the way that you planned on it looking so i'm going to show you a quick tip on how to bring in some data to solve that problem so right now i have a fresh installation of wordpress this is the default 2014 theme it comes with the single hello world post this post has one comment

### Example [0:57]

um now i have a theme here for my website that i want to start developing with locally and if i activate that theme then you can see if i come back out here to the website then from where i only have the one post and the one widget in the sidebar it's kind of hard to tell what this theme is going to look like when it goes live whenever i first started doing this if i encountered this situation sometimes i would come in here to post and just click on add new and start adding in sample data and find some sample images and then i would try to make as many posts as i could that i might encounter on my live site um but that's very time consuming and um and not to mention that after all that time you still might miss a few things that you didn't think to check um

### Theme Unit Test [1:54]

um so the best thing for this is something called wordpress theme unit tests and if we go over here to google if you just google wordp wordpress theme unit then the very top link here will be to the wordpress codecs so if you just click on that then right here it'll give you the test data that you can download so if we just save this xml file and i'm just going to save this into my downloads folder and if we go back to our website if we go down here to tools and import then from here we can click on this wordpress import and install this and then activate plug in and run the importer and then from here let's choose that theme unit test that we just downloaded and then click on upload file and import and then here if you have different authors on your website then you can assign those authors to different parts of the test data but i only have one demo user here so i'm just going to assign that demo user to every one of the authors and you want to be sure to click this here download and import file attachments because you want to import all the images that come with the theme unit test so once this is finished downloading it may take a second okay now that that's finished we can go back to our website and you can see here that it has added in a bunch of different posts and it has pretty much any markup and any elements that you're going to encounter in a live site so here you have all your headings you have tables lists you have some code there's sample images here um it'll tell you the what the dimensions of the image should be whether they're floated to the left or the right or align left or right it also has um some you can see there's four pages of uh of information here they have uh somewhere around here image gallery so yeah here they have image galleries that you can see how to look on your web page um so i highly suggest using this to test how your website is going to look because it pretty much covers anything that you're going to find whenever you go live

### Monster Widget [4:40]

but another thing here that i wanted to show you if you look over here you can see that i still only have the one widget it doesn't it only adds in posts it doesn't add in widgets so if i wanted to see what different widgets would look like on my page there is a plugin that we can install for that if we go back to our dashboard and go to add new on plugins there's a plugin if we just search for developer and these are the same guys who make jetpack that's automatic um if we install this developer plug-in and activate it and then it's going to ask you if this is a plug-in for self-hosted wordpress a theme or a theme for a wordpress. com vip site this is self-hosted wordpress installation so choose that and there's a lot of different things that come with this developer plug-in and i'm not going to go over all of them but uh i you know i highly suggest going in here and checking out some of these um some of these are really useful uh this regenerate thumbnails will if you ever uh change the size of your images as you're testing out a theme then you can just run regenerate thumbnails and it'll take care of all those you can test your themes with these theme testers and theme checked but anyways the one that i wanted to show was this monster widget so let's click on install and now that that's finished installing let's go over here to appearance and widgets and now we'll see that we have this monster widget available and we can add this to any of our sidebars so the sidebars that i want to test out are my primary sidebar so i'll add it to that i want to test out my secondary sidebar i'll add it to that and all three of my footers so i'm going to add three of those okay and now that you've done that you can go back and check out what your site looks like and you can see here what this monster widget does is it adds in a lot of the different things that you can see on a live site so right here added in an archive list it's got your archive drop downs that you can choose from calendar category list category drop downs has a an rss feed some images down here if we go down to the very bottom we can see it does the same thing for the footer so we can see what our footers are going to look like now yeah obviously this isn't what it's going to look like on a live site because the monster widget has so much information in it you'd never have a footer this large but it gives you an idea of what these certain segments would look like on a live site so

### Outro [7:58]

well that's about all i wanted to show you guys um a lot of people already know about this but if uh if you didn't hopefully it was useful i know whenever i found out about it helped me out a lot i was kind of trying to um you know make these posts on my own and uh it took up a lot of time and i ended up missing a lot of things too so it's a lot easier just to pull in this theme unit test and be done with it um you know you can also try to pull down the live data from your database but if you don't have a plug-in like migrate db pro sometimes that can be harder than it has to be so i find this extremely useful especially whenever you don't care so much about the content and you're just trying to get an idea of how your theme looks visually it uh it really does well when it comes to that so yeah i hope this use i hope this uh tip was useful for you guys if you have any questions you know feel free to ask in the comments be sure to subscribe for future tips and tutorials and thanks for watching
