WordPress keeps the web site content in a database separate from the theme and core files.
Were able to change the layout but keep the same content in this lesson you'll import a sample set of
web site content change the home page layout in the current 20:16 theme and then preview how another
theme would look.
Using the same content you'll be importing the standard sample content provided for Wordpress theme
developers for testing.
This list you see every kind of test and image formatting possible as you build a web site.
Let's get started in this chapter.
We're going to be modifying the last site that we made under the old brochure site inside of our local
environment.
So if you don't have it open already.
Open map.
Get the server running and go ahead and log into your Wordpress dashboard at your brochure site.
If you remember.
We set up this brochure site with a static home page a page that we removed the title on and edited
and placed a photo and some content as well as modifying the navigation Hetter the sidebar and the footer
content.
The first thing we're going to do is import some sample content so that we can see what the site will
look like.
As we have multiple blog posts coming up on the home page.
So if you navigate to WordPress dot org.
What I usually do is search for sample SML.
It's an XML file that will be looking for to import into Wordpress and it'll show us many different
kinds of layout options.
In fact every single layout option that a WordPress site might have so that we can test what a theme
looks like.
It's got a theme.
Unit test.
This comes from the Wordpress Kodak's under support and here it is right here.
It's from Automattic the company behind Wordpress and its the theme unit test data.
SML.
If you click the link it might just open all of the SML document into your browser.
So what you might want to do is right click and then save link as and that will go ahead and download
it into my downloads folder here and it'll save it as the theme.
Unit Test Data dot X will insets finished downloading.
I can't open the downloads folder in Windows Explorer and then I can drag that over to my wordpress
folder.
Looks like I've already got it there so just make sure I have the latest one.
Now I'll go back into the dashboard and if you go under Tools import there's a number of importer's
that will be referenced here on the import page.
And we're going to download the Wordpress importer.
These are all different import or plug ins and if you just click WordPress it'll prompt you to download
the Wordpress importer plugin
install.
You can click activate plug in and run in Puerto
and then browse to your computer where you saved the xml file.
Upload file and import if you like.
You can just import these authors or you can attach or assign the posts to an existing user.
If I want to explore how different authors would look inside the site I might just go ahead and leave
those authors as users in the site.
And I do want to click download an import file attachments.
There we go.
If you click Have fun it'll bring you straight back to the dashboard.
Now we can see in the activity that there is some more published posts there's some comments in here.
Let's go ahead and look at posts all posts.
You can see that not just hello world but there's a whole bunch of posters actually 41 items in my posts.
And in terms of pages I've got 22 pages they're marked so that we can see what they look like and what
they're all about.
And let's look at the users.
Finally
it's imported these users.
Now these users are subscribers instead of administrators and it shows you how many posts each one of
them have.
As the administrator I'll be able to access all of the posts even if they're authored by these fictitious
users.
And let's take a look at the media library and make sure that we've imported all the media great.
For example some of the images are labeled with their size and you can also see
which page or post each of these image is attached to.
So let's change the home page of our site to instead of being just a single page.
Let's have it be a list of posts in reverse order with the newest one at the top.
Go to the Wordpress dashboard and under settings reading
instead of displaying a static page the front page displays your latest posts.
It save changes.
Settings saved.
And now if we refresh the home page
we'll see a featured post which is sticky which means that post sticks to the top.
There's our latest hello world page that was formed as a default post when we installed WordPress.
But then here's the rest.
That's a long post.
Here's another one.
Image alignment.
One of the things we can do to trim down each of those lengthy pages is to show instead of 10 posts
on a page.
Let's go ahead and show three we can also if I go back to the home page itself on the first page of
this home page I want to shorten up this one called markup H.T. email tags and formatting.
I'll just use the convenient edit button here.
And after a small section of the post what I'll do is insert a read more tag.
That way when this post is being displayed on an archive page or on a list of posts page like the home
page it'll place a read more link instead of listing the whole post click update Gary.
Let's take a look.
Here's the sticky posts.
Hello world.
And great.
Instead of the lengthy post I've got a continue reading button where I can click that to open up the
post itself.
Now that we have a revised layout with blog posts on the home page instead of a single page you can
also see that our pages widget has changed and so many more pages that we imported as a part of that
XML document.
But let's go ahead and look at what a different theme would look like with the same content.
So under appearance theme's
you can see that we have 20:16 active 2015 and 2014 is an interesting theme that's designed as kind
of a magazine theme with blog posts on the home page.
If we click live preview it will open the customized and show us what our existing content will look
like inside of a new theme.
It is nice you can see the typographic is totally different.
The column is narrower.
Here's a widget on the side that came from our original footer widget and then if I scroll to the very
bottom of the page here's the map which was our other footer widget.
When you change themes sometimes the widget locations change a little bit.
So what's called the footer widget area here in 2014 contains my Google map plug in map and in the content
sidebar that's where the find me widget is up here in the content side bar and the primary side bar
looks like it has the search window and the pages widget that we had placed before well I'm just looking
at a sample so I can close that and I'm back to the other theme.
In this video you imported a theme testing document into your Wordpress installation and modify the
homepage to list posts instead of a single page.
You also previewed the 2014 theme without actually activating it in the next video.
You'll activate 2014 revise the widgets to match the theme and add a featured posts area to the home
page.