Wednesday 24 July 2013

Adding an image from the Web

To add an image from the Web after you click the Add an Image icon, follow these steps:
1. Click the From URL tab in the Add an Image window.
The Add Media File from URL window opens.
2. Type the URL (Internet address) of the image in the Image URL text
box.
Type the full URL, including the http:// and www portion of the
address. You can easily find the URL of any image on the Web by rightclicking (PC) or Command-clicking (Mac), and then selecting Properties from the pop-up menu that appears.
3. Type a title for the image in the Image Title text box.
4. Type a description of the image in the Alternate Text text box.
The alternative text appears in a browser for visually impaired people
who use text readers or if, for some reason, the image doesn’t load prop-
erly. Although alternate text gives the visitors to your site a description
of what the image is, it can also improve your SEO (search engine optimi-
zation) efforts. Search engines read the alternative text (also called ALT
tags) to further categorize and define your site in listings and directories.

5. (Optional) Type the caption of the image in the Image Caption text

box.
The words you type here appear below the image on your blog, as a
caption.
6. Specify an alignment option by selecting the None, Left, Center, or
Right radio button.
7. Type the URL to which you want the image linked.
The option you select determines where your readers go when they click the image you uploaded:
• None: You don’t want the image to be clickable.
• Link to Image: Readers can click through to the actual image itself,
where the image file loads in their browser window.
8. Click the Insert into Post button.
WordPress inserts the appropriate HTML markup in the body of your
post so that the image gets displayed when visitors to your site view
your post.

Inserting Images into Your Blog Posts

You can add images to a post pretty easily by using the WordPress image
uploader. Jump right in and give it a go by clicking the Upload an Image icon
on the Add New Post page. The Add an Image window that appears lets you
choose images from your hard drive or from a location on the Web (see
Figure 3-1).
The interface that WordPress uses for file uploads is based on Adobe Flash.
Flash is a specific set of multimedia technologies programmed to handle
media files on the Web. Some browsers and operating systems aren’t config-
ured to handle Flash-based applications. If you experience difficulties with
the Add an Image window, WordPress gives you an easy alternative: Click
the Browser Uploader link in the Add an Image window to use a non-Flash-
based uploader to transfer your files.

Adding a Blog to Your Web Site

If you want a blog on your site but don’t want to display the blog on the front page, you can add one from the WordPress Dashboard. To create the blog for your site, first follow these steps:

1. Click Add New link in the Pages drop-down list.
The page where you can write a new post to your WordPress blog
opens.
2. Type Blog in the Title text box.
The page slug is automatically set to /blog. (Read more about slugs in Book III, Chapter 3.)
3. Leave the Page Content text box blank.
4. Click the Publish button.
The page is saved to your database and published to your WordPress
site.
Now, you have a blank page that redirects to http://yourdomain.
com/blog. Next, you need to assign the page you just created as your
blog page.
5. Click Reading in the Settings drop-down list.
The Reading Settings page opens.
6. From the Posts Page drop-down list, select the page that you created
in the preceding step list.
The page is set as your blog page.
7. In the Blog Pages Show at Most section, type the number of posts that
you want to appear in the Posts text box.
If you enter 5, for example, the blog page shows the last five posts you made to your blog.
8. Click the Save Changes button.
The options you just set are saved, and your blog is now at http://
yourdomain.com/blog (where yourdomain.com is the actual domain name of your site).
When you navigate to http://yourdomain.com/blog, a listing of your
blog posts appears.

This method of using the /blog page slug works only if you’re using custom

permalinks with your WordPress installation.if you
want more information about permalinks.) If you’re using the default perma-
links, the URL for your blog page is different; it looks something like
http://yourdomain.com/?p=4 (where 4 is the ID of the page you created
for your blog).

Assigning a static page as the front page

After you create the page you want to use for the front page of your web site, tell WordPress that you want the static page to serve as the front page of your site. Follow these steps:
1. Click Reading in the Settings drop-down list to display the Reading
Settings page.
2. In the Front Page Displays section, select the A Static Page radio
button.
3. From the Front Page drop-down list, select the static page that you
want to serve as your front page.
In Figure 2-4, we chose to display a static page, and the Welcome page is the one we want to appear on the front page of the Web site.
4. Click the Save Changes button at the bottom of the Reading Settings
page.
WordPress displays the page you selected in Step 4 as the front page of
your site.

Creating the Front Page of Your Web Site

✦ Custom Fields: Custom fields add extra data to your page, and you can

fully configure them. You can read more about the Custom Fields feature
in WordPress in Book IV, Chapter 5.
✦ Discussion: Decide whether to let readers submit comments through the
comment system by selecting or deselecting the Allow Comments text
box. By default, the box is checked; uncheck it to disallow comments on
this page.
Typically, you don’t see a lot of static pages that have the Comments
feature enabled because pages offer static content that doesn’t generally
lend itself to a great deal of discussion. There are exceptions, however,
such as a Contact page, which might use the Comments feature as a way
for readers to get in touch with the site owner through that specific
page. Of course, the choice is yours to make based on the specific needs
of your Web site.
✦ Author: If you’re running a multi-author site, you can select the name of
the author you want to be attributed to this page. By default, your own
author name appears selected here.
✦ Publish: The publishing and privacy options for your post, which we
cover in Book IV, Chapter 1.
✦ Page Attributes: Select a parent for the page you’re publishing. In Book
III, Chapter 7, we cover the different archiving options, including the
ability to have a hierarchical structure for pages that create a navigation
of main pages and subpages (called parent and child pages).
✦ Page Template: Mentioned in the section “Creating the Front Page of
Your Web Site,” earlier in this chapter. You can assign the page template if you’re using a template other than the default one (Book VI, Chapter 7 contains more information about themes and templates, including using page templates on your site).
✦ Page Order: By default, this option is set to 0 (zero). You can enter in
a number, however, if you want this page to appear in a certain spot
on the page menu of your site. (If you’re using the built-in menu feature

in WordPress, you can use this option; but you don’t have to use it because you can define the order of pages and how they appear in your menu by assigning a number to the page order — for example, a page with the page order of 1 will appear first in your navigation menu, where a page with the page order of 2 will appear second, and so on.
✦ Featured Image: Some WordPress themes are configured to use an
image (photo) to represent each post that you have on your blog. The
image can appear on the home/front page, blog page, archives, or any-
where within the content display on your Web site. If you’re using a
theme that has this option, you can easily define a post’s thumbnail by clicking the Set Featured Image link below the Featured Image module on the Add New Post page. Then you can assign an image that you’ve uploaded to your site as the featured image for a particular post.

Creating the static page

To have a static page appear on the front page of your site, you need to create that page. Follow these steps:

1. Click Add New in the Pages drop-down list.
The Add New Page page opens, where you can write a new page for your WordPress blog, as shown in Figure 2-3.
2. In the Title text box, type a title for the page.
3. Type the content of your page in the large text box.
4. Set the options for this page.
We explain the options on this page in the following section.
5. Click the Publish button.
The page is saved to your database and published to your WordPress
site with its own, individual URL (or permalink). The URL for the static
page consists of your blog URL and the title of the page. For example,
if you titled your page About Me, then the URL of the page is http://
yourdomain.com/about-me.

The Page Template option is set to Default Template. This setting tells

WordPress that you want to use the default page template (page.php in
your theme template files) to format the page you’re creating. The default
page template is the default setting for all pages you create; you can assign
a different page template to pages you create, if your theme has made dif-
ferent page templates available for use. In Book VI, Chapter 6, you can find
extensive information on advanced WordPress themes, including informa-
tion on page templates and how to create and use them on your site.

Creating the Front Page of Your Web Site

For the most part, when you visit a blog powered by WordPress, the blog
appears on the main page. Lisa’s personal blog at http://lisasabin-
wilson.com, powered by WordPress (of course), shows her latest blog
posts on the front page, along with links to the post archives (by month
or by category).
But the front page of Lisa’s business site at http://ewebscapes.com, also
powered by WordPress, contains no blog and displays no blog posts (see
Instead, it displays the contents of a static page that Lisa cre-
ated in the WordPress Dashboard. This static page serves as a portal to her
design blog, her portfolio, and other sections of her business site. The site
includes a blog, but also serves as a full-blown business Web site, with all
the sections Lisa needs to provide her clients the information they want.
Both of Lisa’s sites are powered by the self-hosted version of WordPress.org, so how can they differ so much in what they display on the front page? The answer lies in the templates in the WordPress Dashboard.
You use static pages in WordPress to create content that you don’t want to appear as part of your blog but do want to appear as part of your overall site (such as a bio page, a page of services, and so on).

 

Creating a front page is a three-step process: Create a static page, designate that static page as the front page of your site, and tweak the page to look like a Web site, rather than a blog.

By using this method, you can create unlimited numbers of static pages to build an entire Web site. You don’t even need to have a blog on this site, unless you want one.

Creating the Front Page of Your Web Site

 

With the page feature, you can create an unlimited amount of static pages separate from your blog posts. People commonly use this feature to create About Me or Contact Me pages, among other things. Table 2-1 illustrates the differences between posts and pages by showing you the different ways the WordPress platform handles them.

Differences between a Post and a Page

WordPress Options                             Page                         Post

Appears in blog post listings            No                            Yes

Appears as a static page                      Yes                           No

Appears in category archives           No                            Yes

Appears in monthly archives            No                            Yes

Appears in Recent Posts listings       No                            Yes

Appears in site RSS feed                        No                            Yes

Appears in search results                     Yes                           Yes

 

Understanding the Difference between Posts and Pages

In this post, we go into great detail about how WordPress archives
your published content on your site by filing it under categories and tags, as
well as by date (year/month/day/time of day), and through the use of pages,
rather than posts.

Pages, in WordPress, are different from posts because they don’t get
archived the way your blog posts/articles do: They aren’t categorized or
tagged, don’t appear in your listing of recent blog posts or date archives,
and aren’t syndicated in the RSS feeds available on your site — because con-
tent within pages generally doesn’t change. Pages are considered static or
stand-alone content and exist separately from the archived post content on
your site.

Arranging post modules

Aside from being able to make the Post text box bigger (or smaller), as we
discuss in the section “Creating Your Own Workspace for Writing,” earlier in
this chapter, you can’t edit the Post text box module. You can configure all
other modules on the Add New Post page (and the Edit Post page); you can
remove them (in the Screen Options panel, as we discuss in the preceding
section), expand and collapse them, and drag them around to place them in
a different spot on your screen.
Collapse, or close, any of the modules by hovering your mouse over the
module title and then clicking the down arrow that appears to the right of
the module name, as shown in Figure 1-10 for the Categories module (like-
wise, you can expand, or open, a module by doing the same when it’s
collapsed).

You can also drag and drop a module on the Add New Post screen to position it wherever you want. Just click a module and, while holding down the mouse button, drag it to different area on the screen. WordPress displays a dashed border around the area when you have the module hovering over a spot where you can drop it. Because Lisa uses the Featured Image module on every post she publishes, she’s dragged that module to the top right of her writing space, as shown in Figure 1-11.

You can really configure your own custom workspace on the Post page

within your Dashboard that suits your style, work habits, and needs. WordPress remembers all the changes you make to this page, including the screen options and modules, so you have to set up this page only once. You can drag and drop modules on any Dashboard page in the same way you do on the main Dashboard page, as covered in Book III, Chapter 2.

Adjusting screen options

Several items appear on the Add New Post page, as described in the section, “Composing Your Blog Post,” earlier in this chapter. You may not use all these items, and in fact, you may find that simply removing them from the Add New Post page (and the Edit Post page) makes writing your posts easier and more efficient. To remove an item, follow these steps:

2. Select or deselect items below the Show on Screen heading.

Select an item by placing a check mark in the check box to the left of its name; deselect it by removing the check mark. Selected items appear on the page, and deselected items are removed from the page.
If you deselect an item that you want to include again on the Add New
Post page, it’s not gone forever! Revisit the Screen Options panel and
reselect its check box to make that item appear on the page once again.
3. Select your preferred Screen Layout.
You can choose whether the layout appears in one column or two columns (the default option).
4. Click the Screen Options tab when you’re done.
The Screen Options panel closes and the options you’ve chosen are saved and remembered by WordPress.

Creating Your Own Workspace for Writing

1. Click the Screen Options tab at the top of the screen.

The Screen Options panel drops down,

2. When you find the post you need, click its title.

Alternatively, you can click the Edit link that appears below the post
title.
The Edit Post window opens. In this window, you can edit the post and/ or any of its options.
If you need to edit only the post options, click the Quick Edit link. A
drop-down Quick Edit menu appears, displaying the post options that
you can configure, such as the title, status, password, categories, tags,
comments, and timestamp. Click the Save button to save your changes.
3. Edit your post; then click the Update Post button.
The Edit Post window refreshes with all your changes saved.
Creating Your Own Workspace for Writing
You can discover how to organize the Dashboard to create your own customized workspace by rearranging modules and
screen options for your Dashboard. The Add New Post page, where you
write, edit, and publish your post, has the same options available, allowing you to fully control the workspace arrangement to create your own custom, unique space that suits your writing needs.
To start customizing your workspace, open the Add New Post page by click-
ing Add New in the Posts drop-down list on the Dashboard.One of the first
things we do when we visit this page on a new WordPress site is make the
Post text box (where you write the content of your post) bigger. You just
need to click your mouse in the bottom corner of the box, and while hold-
ing down your mouse button, drag it until it’s the length you want, and then
release your mouse button (conversely, you can make the box smaller by
dragging it up, rather than down).

Being your own editor

While we write this book, we have editors looking over our shoulders,
making recommendations, correcting typos and grammatical errors, and
helping us by telling us when we get too long winded. You, on the other
hand, are not so lucky! You’re your own editor and have full control of what you write, when you write it, and how you write it. You can always go back and edit previous posts to correct typos, grammatical errors, and other mistakes by following these steps:
1. Find the post that you want to edit by clicking Posts in the Posts drop- Book IV
down list. Chapter 1
The Posts page opens and lists the 20 most recent posts you’ve made to
your blog.
To filter that listing of posts by date, select a date from the Show All
Dates drop-down list at the top of the Posts page. For example, if you
select February 2011, the Posts page reloads, displaying only those
posts that were published in the month of February in 2011.
You can also filter the post listing by category. Select your desired category from the View All Categories drop-down list.

Refining Your Post Options

This option is otherwise known as a sticky post. Typically, posts are

displayed in chronological order on your blog, displaying the most
recent post on top. If you make a post sticky, it remains at the very top,
no matter how many other posts you make after it. When you want
to unstick the post, deselect the Stick This Post to the Front Page
check box.
✦ Password Protected: By assigning a password to a post, you can publish
a post to your blog that only you can see. You can also share the post
password with a friend, who can see the content of the post after he
or she enters the password. But why would anyone want to password-
protect a post? Imagine that you just ate dinner at your mother-in-law’s
house and she made the worst pot roast you’ve ever eaten. You can
write all about it! Protect it with a password and give the password to
your trusted friends so that they can read all about it without offending
your mother-in-law. Figure 1-7 shows a published post that’s private;
visitors see that a post exists, but they need to enter a password in the
text box and then click Submit in order to view it.

✦ Private: Publish this post to your blog so that only you can see it — no

one else will be able to see it, ever. You may want to protect personal
and private posts that you write only to yourself (if you’re keeping a per-
sonal diary, for example).

✦ Publish Immediately: Click the Edit link to make the publish date

options appear, where you can set the timestamp for your post. If you
want the post to have the current time and date, ignore this setting
altogether.
If you want to future-publish this post, you can set the time and date
for anytime in the future. This feature has come in handy for Lisa many
times. For example, when you have a vacation planned and you don’t
want your blog to go without updates while you’re gone, you can write
a few posts and set the date for a time in the future. Those posts are
published to her blog while you’re somewhere tropical, diving with the
fishes.
✦ Publish: This button wastes no time! It bypasses all the previous draft,
pending review, and sticky settings, and publishes the post directly to
your blog immediately.
After you select an option from the Publish drop-down list, click the Update button. The Write Post page saves your publishing-status option.
If you click Publish and for some reason don’t see the post appear on the front page of your blog, you probably left the Status drop-down list set to Unpublished. Your new post appears in the draft posts, which you can find by clicking Edit in the Posts drop-down list.

Publishing your post

After you give your new post a title; write the content of your new blog post; maybe add an image or other type of media file to your blog post (see Book IV, Chapter 4); and configure the tags, categories, and other options, now the question is: Publish? Or not to publish (yet)?
WordPress gives you three options for saving or publishing your post when
you’re done writing it. The Publish module is located on the right side of
the Add New (or Edit) Post page. Just click the title of the Publish module to
expand the settings you need. Figure 1-6 shows the available options in the
Publish module.

The Publish module has several options:

✦ Save Draft: Click this button to save your post as a draft. The Add New
Post page reloads with all your post contents and options saved; you
can continue editing it now, tomorrow, the next day, or next year — the
post is saved as a draft until you decide to publish it or delete it. To
access your draft posts, click the Posts link on the Posts menu.
✦ Preview: Click the Preview button to view your post in a new window,
as it would appear on your live blog if you’d published it. Previewing the
post doesn’t publish it to your site yet. It gives you the opportunity to
view it on your site and check it for any formatting or content changes
you want to make.
✦ Status: Click the Edit link to open the settings for this option. A drop-
down list appears, from which you can select Draft or Pending Review:
• Draft: Save the post in draft form but don’t publish it to your blog.
• Pending Review: The post shows up in your list of drafts next to a
Pending Review header. This option lets the administrator of the
blog know that contributors have entered posts that are waiting for
administrator review and approval (helpful for blogs that have mul-
tiple authors).Generally, only contributors use the Pending Review
option.
Click the OK button to save your Status setting.
✦ Public: Select this option to make the post viewable to everyone who
visits your site.
✦ Stick This Post to the Front Page: Select this check box to have
WordPress publish the post to your blog and keep it at the very top of all blog posts until you change this setting for the post.