- Overview
- Transcript
2.1 Creating Your First Post
In this lesson, I'll show you how to create a post and use blocks to add content to it.
Related Links
1.Introduction2 lessons, 05:33
1.1Introduction00:46
1.2The Difference Between Posts and Pages04:47
2.Creating Posts2 lessons, 21:52
2.1Creating Your First Post10:31
2.2Working With Categories and Tags11:21
3.Creating Pages2 lessons, 13:02
3.1Creating a Static Page07:40
3.2Creating Hierarchical Pages and Using Page Templates05:22
4.Conclusion1 lesson, 02:31
4.1Conclusion02:31
2.1 Creating Your First Post
Hello, and welcome back to this Tuts+ course on creating content with posts and pages in WordPress. In this part of the course, I'm gonna show you how to create a new post. And I'll also show you some of the settings and configurations that you have available for posts. So when you start a brand new WordPress site, you'll probably have one dummy post already in there called Hello World. And you can choose to edit that if you want, or you can just delete it and add your own posts. Now in my case, I've deleted it so I can add a new post from fresh, because I want to make sure it's got the correct date and everything. Although you can always change that in your posts. So let's click on Add New here. So I'm in the Posts listings screen and I can click the Add New button, or alternatively I can use the Add New link in the menu. So I'll click on Add New, and now I get the editing page for New Post. Now this uses the Gutenberg editor. So you'll be using blocks to create your post. So just start by typing the name of your post in the box at the top. And then if you hit return, tt will take you to the first block. Gutenberg will assume that you want a standard paragraph block. So if you start typing, it'll just create a paragraph for you. Making sure you type it correctly And if I then hit return again, I get another paragraph. And I could keep doing that all the way down the page. Now alternatively, you can create a different type of block by hovering over your new block and selecting a type of block here. And here, I've got text, list, or short code as options for me. And you'll find that WordPress will actually learn which blocks you use most commonly. So if you're adding images a lot, it will add images here, possibly instead of short codes if you don't use those a lot. Alternatively, you can type a forward slash and you then get shortcut menu with a range of block types that you can use. Now you can select one from the menu or you can start typing. So if I type image I can just then select image block, or I could've hit return and I would get an image block. So now I can upload an image or I can add one from the Media Library. Let's take a look at what I've got in my media library. So I've got a picture here of Robert Downey Jr. So I'm gonna add that Tony Stark picture. I'll add some alt text for accessibility and I'll add, A description for SEO purposes. I'm not gonna bother with the caption. So I then click on Select to add an image. And you can see here it's quite a small image and it's taking up the whole width of the page. So I want to change that. Now if you've got a nice big image you might want to lay it out like that. Alternatively, you might want to center it. And you have these controls here for your image blocks that you can use for that, but I'm going to right align it, and that means the text will wrap around it. And I'm gonna move it up a bit, using the arrows here. So that takes it to the top of my post. So if I save that as a draft now and preview it, you'll be able to see my text wrapped around my image. And here's my post being previewed. Now this isn't published yet, at the moment, it's just a draft. So if we go back to the post editing screen, you can see that it says Save Draft here and also I have the Publish button here. Now when your post is still a draft, this button here will say Publish. Once it's been published, that will change to Update. So if you ever make any changes to your post in the future, it will simply update. But you can always preview any changes before you do so, so it's a really good idea to use this Preview button to take a look. So you can add plenty more block types. Let's have a look at some other alternatives so I could create a list. Alternatively, I'm hitting return twice which takes me back to a paragraph. Now you can convert a block from one type to another. So if I select both of these paragraphs here and I click on this button here, I can transform it to a list. And you'll see there are other alternatives. And these transformation alternatives will depend on what type of block you're already working with. So for example, my image block, I could transform that to a gallery, a cover, a file, or media and text, so I can add some text by the side of my image. So that means that I can just work with the block type that's similar to the block that's already there. So here's my first post. Content isn't brilliant right now but it gives you an idea of how you create a post. So over here I've got Status & Visibility, in the document pane here. And you can switch between document and block. Block is only relevant if you're actually working with an individual block, so you can see that changes depending on the type pf block I am in. Now the document pane here, I can set the visibility of my post. So that by default is public but I could make it private so it's only visible to certain people or password protected. My publication date defaults to immediately, so when I hit Publish up here it will immediately be published, but I can change that. So I can schedule it for the future if I want to, which is one of my favorite WordPress features because what I'll do is I'll write a batch of posts and then I'll schedule them to be published in the next few weeks. So, for example, on my blog, I have one particular feature that runs every single Friday afternoon, and I'm not always at my computer every Friday afternoon. But what I'll do is I'll publish it in advance, I'll schedule it, I won't publish it, and it will then automatically be published when I set it to. Here, I can make it sticky, so that goes on the top of my blog listing, and I can also do pending review. So if I'm a contributor, and there's an editor also on my site, I can change that to pending review. I could also change the author. So I could pick any other person who has the right access privileges to become the author of this post. Some other features we have here is the permalink so you can edit the slug if you want to for SEO purposes. You can edit the categories, and we'll come to categories in the next part of the course, and the same for the tags. The featured image is one image which will display at the top of the post and will also display in post listings in archive pages for that post, such as the main blog page or category archives. So I can add an image there that will be the featured image representing my post. So let's add a featured image using this Set Featured Image option, and I'm gonna use that woodland scene. We'll see how that works cuz it'll probably be cropped cuz it's quite a narrow image. Excerpt, this is a short excerpt of your post that will be displayed on archive pages depending on how your theme's set up. Now by default, WordPress will find the first 55 characters of your post, and it will use that for the excerpt, which often means that it's truncated, it doesn't make sense, you've got it clipped off in the middle of a sentence. I much prefer to write my own excerpt. And it also helps to write something that will encourage people to click through. And then discussion, here I can see whether I'm allowing comments and or ping backs and track backs. And by default, those are both turned on and I'm gonna leave them on. So now I'm gonna publish my post. So WordPress gives me some checks. So it wants me to be absolutely sure that I want to publish my post and it's suggesting that I add some tags. And we'll do that in the next part of course. So I then hit Publish again. And it's now gone live. So I can view it on my site, and here you can see my featured image, it has been cropped but it looks rather nice with this blue effect over it. And then I've got my image of Tony Stark, I've got my paragraphs and my lists and you can see it's got me as the author. It's got comments turned on and it's also been added to the Recent Posts widget, which I've got in my footer. So that's how you add a new post. And if I go back to the admin screens and I click on the Posts screen, here it is, My First Post. So to edit that I can then just click on it. Alternatively, if I'm logged in, when I'm viewing the post, I can click the Edit Post link here up in the toolbar to edit the post. And I can switch it to draft if I want to, if I want to unpublish it, or I can just make some changes, and I can type that correctly, and I can preview my changes before I have those go live. So, there you go, I'm happy with that, except I'm not, cuz it's just a word. Let's get rid of that. I'm gonna be controversial here, cuz quite a lot of people don't love blocks, but I think they're really useful. I think they give us a much more intuitive editing experience and they add a lot of content types to WordPress that you can use. So I'm gonna preview that. Here we go. I love blocks. And then I'm gonna click on Update. I'll view the post, and my live post now has my change. So that's how you create a post in WordPress, and you edit it. In the next part of the course, we're gonna move on to looking at categories and tags for your posts. And I'll show you add categories and tags and how to assign them to individual posts. See you next time and thanks for watching.