WordPress 24-Hour Trainer. Plumley George

Чтение книги онлайн.

Читать онлайн книгу WordPress 24-Hour Trainer - Plumley George страница 4

WordPress 24-Hour Trainer - Plumley George

Скачать книгу

generate a web page in a matter of seconds. The number of requests or queries made to the database averages approximately 40 or 50 for a typical WordPress page. Dynamic web pages are not cheap. They can place a heavy load on server resources if a lot of people try to access the site at one time. That's why many sites use a caching system with their CMS, which means that snapshots are taken of each page and stored as single, static HTML pages, avoiding all the back and forth between files and the database. The caching system keeps track if any changes are made to a page and takes a new snapshot as needed. That way you have the advantages of both dynamic page generation and static page serving.

      The advantages of keeping these four elements of WordPress separate are many. Changing the look of your site is as simple as changing the theme. If a plugin starts causing problems for your site, you simply remove it and plug in a new one. If a new social media platform becomes the next big thing, someone will come up with a plugin to interact with it – or you can have your own made. When WordPress needs updating, your site's options and preferences remain untouched in the database. And if your host gives you poor service, you just copy all the files and the database, and move them to a new server.

      But, although WordPress by its nature as a CMS and through its particular design produces dynamic web pages, its built-in tools can go only so far. Sites using WordPress can be more or less dynamic in nature depending on how the user works with WordPress's tools. Some of the power and flexibility in your site comes down to you.

      Your Role in Making Your Site Flexible

      As mentioned earlier, a good CMS needs to have a simple user interface, and WordPress lives up to this requirement. Actually, it was that ease of use that first led me to use WordPress on my clients' sites. Even as it has grown more complex, the developers of WordPress have continually worked to keep the interface user-friendly.

The menu system, for example, enables an unlimited number of menus; each can handle dozens and dozens of menu items with multiple levels of drop-downs, and those menu items can be virtually any type of content within WordPress: pages, posts, categories, tags, and more. Yet, as you can see in Figure 1.4, all this complexity is handled with simple check boxes, drag-and-drop interfaces, and drop-down selections.

Figure 1.4

      But with great power comes great responsibility. You're the one who has to create a useful and easy-to-follow navigation system for your users; WordPress cannot do that for you. It just makes it easy for you to do the creating. The more you can understand what's possible with WordPress, the better you'll become at making use of its powerful tools to create the best website for your visitors.

      Understanding the difference between two ways of handling content in WordPress is particularly important to making your site easier for you to use and more useful to your visitors, and that is the difference between posts and pages.

      Posts and pages share a lot of similarities, in particular the way their user interfaces or, in WordPress terminology, their admin screens work (which means there are many functions you'll have to learn only once). Where they differ brings you to the heart of the principle in this lesson: Store everything in the smallest possible pieces.

      Take testimonials. For many websites it is absolutely crucial to have testimonials from satisfied customers or clients. So you grab those e-mails and letters people have written praising your services and you open up WordPress. You want a web page of all those testimonials, so under Pages in the WordPress menu, you select New Page. The WYSIWYG editor makes it easy to copy the text over from your e-mail or Word document, add any extra formatting, and get the page looking nice indeed.

      Fast forward 6 months, and you decide that you would like to group some of the testimonials onto another web page because they all relate to a particular service. Not so bad; you just copy the text of the page, create a new WordPress page, paste it in, and then delete the testimonials you don't need. Then a month later you get a new testimonial that belongs on both pages. You copy and paste into both. But suppose you have several categories of testimonials; you can see how this could get both tedious and complex to manage.

      Remember earlier in this lesson the diagram of the testimonials page (refer to Figure 1.2) and how you might break it up instead into individual testimonials? Well that's what posts in WordPress are for: groups of related content that you can categorize. That's all we mean when we talk about a blog: groups of similar content. So now, instead of putting all the testimonials in a WordPress page, you can create a category of posts called Testimonials and enter individual testimonials as posts, assigning them to that category. Then put the category on your site menu, and when visitors click that link, WordPress gathers all the relevant posts and outputs them as a single web page.

      Fast forward 6 months again and you decide you need a category of testimonials for a particular service. Just create a subcategory of Testimonials called, say, Workshop Testimonials. Through an easy WordPress interface, you can assign 2, 20, or 200 testimonials to that new category with a single click. Then you just put the Workshop Testimonials on your menu or create a link to the category wherever you want. When visitors click, they see only testimonials about your workshop.

      By keeping those testimonials individual, the possibilities are endless. Need rotating testimonials on the front page? Want to feature a particular testimonial on the sidebar of a specific page? It's only possible by keeping them as separate posts. That's the power of thinking like WordPress. In the next lesson you start applying that thinking to a sample site, and throughout this book you see ways to use WordPress's tools to increase the power and flexibility of your site.

      NOTE Okay, having just told you how posts and pages differ in WordPress, I use the term posts throughout this book to mean both posts and pages. Partly, it's to avoid potential confusion with the term page, but mainly, it's for the sake of simplicity. The way you enter and edit content for posts and pages is basically identical because they both share the majority of content management features. Where necessary, I'll distinguish between them, but unless I do you can assume that when I say posts, I mean both posts and pages.

      Try It

      There isn't anything specific to try based on the material in this lesson, but one thing you can do is examine your favorite news website, and in the content area of the site, try to image how those pieces of content might be separated in the site's CMS. Then go to another page, compare what's common with the previous page, and try to imagine how the builders have divided up the structure of the page – map it out on paper.

      REFERENCE There is no video to accompany this lesson.

      Lesson 2

      Planning Your Site for WordPress

      It's beyond the scope of this lesson to go into the entire planning process for a website. Rather, the goal is to map out a website and plan generally how to implement it in WordPress.

      If you're setting up a personal blog, WordPress has done much of the structuring for you, and you could skip to the next lesson, but there's still plenty here that can be of use. For everyone else, this is an important step because with the right kind of planning upfront, not only can you save a lot of time and energy in the future, but it also can help you think about ways to make your website even more useful and easier to navigate.

      To build a site in WordPress, you have three key things to consider during the planning process:

      ● What content will you have? (Including areas such as the header and footer)

      ●

Скачать книгу