Lesson 2: Structure: content + theme + plugins Wordpress



WordPress separates content from its display. On one side: the administration to write the background. Another: the themes to play on the form. Between: plugins.

Tails: content

Base, a WordPress allows you to post three types of content:

.Post (dynamic content)
These are a blog tickets. For this, they have a timeline and displayed from newest to oldest. It is classified in at least one category have one author can have keywords ...
.Page (Static Content)
This is the content of the site does not change over time, such as the "About" page (which describes the site) or the "Contact" page (with form). Pages are less used in WordPress because they have fewer features than the Posts, but also have different (order Pages, hierarchy template page).
.Attachment (including pictures)
This is connected to a media content Post. It can not exist alone.

It also exsite a fourth type of content: the links. It's the ones that appear in the blogroll for example. They have a name, a URL, a description, a category (not to be confused with the categories of Post), metadata ... There's not much to say, and I never use them. Go instead read the official doc if you will use them.

In order not to lose between a WordPress page and a web page (for example), I will try to capitalize "Page" when I speak of the content type WordPress, "page" error.
I will speak of a homepage home.php but the page "About" page.php.

Post

The Post  is the sinews of war to WordPress. Basically, WordPress is a blog engine, so obviously, the Posts are the main feature.

What, then mostly contain a Post?

Title: the title of the post altogether.
ID: the unique identifier of Post
Content: the contents of the ticket in HTML, the one that fits through a WYSIWYG with <p> <ol>, <ul>, <blockquote>, <a>, <strong>, <em>, <h1 > ... </ h6>, but also images and videos.
author: Post each is assigned to a single author (you can create as many as you want).
Date: the date and time of publication Post.
category: Post a still belongs to at least one category.
There are other optional information:

excerpt: an explicit summary, independent of the "content"
thumbnail: an image "on the front," among those attached to the Post
tags: the keywords attached to the Post
slug: the shape url-friendly (no spaces or special characters and lowercase) of the title, but generated by WP editable. For example, in Post this, the slug is structure-content-theme-plugins
custom fields: the metadata Post you set yourself. For example, if you want to add humor to each of your tickets, create a custom field "mood" with the possible values "happy", "grumpy", "sleeper" ... It is completely arbitrary.
This is obviously not an exhaustive list of information that Post may hold but this is mainly the ones you need.

Page


Page is used to publish static content, that is to say, out of chronological flow of Posts. The typical example is the page "About" which describes the purpose of the site. You may also like Pages Copyright, legal notices, contact form ...

Technically, a page is almost identical to the Post, that she also has a title, ID, HTML content, an author, a date ...

A page has not:

.class
.tag
.excerpt

Page has a supplement:

a hierarchy (a page may be child / parent of another)
an order (for multiple page of the same level, an order may be made)
templates (if you want a certain page has a special design)

settings
In WP settings, you can define the metadata of the site, including:

the site name
slogan
website address
the time zone (for good practice set the time of publication of Posts)

On the front the theme
After you enter your content in the administration, WordPress handles the display on your site using a theme. He is forced to use a theme, and only one! You can choose which via the administration in "Appearance -> Themes".

By default, WordPress comes with 4 themes Twenty Fourteen and Fifteen Twenty again.

A theme, what is it?
A theme is a file that is placed in wp-content / themes. It contains:

.style.css: mandatory stylesheet because it contains the theme information (as CSS comments)
.screenshot.png: an image (optional) theme that appears in the admin
.templates: the .php files, according to their names are called by WP to display their content. They contain HTML and PHP code. For example, home.php is called to the home page, page.php for displaying a page ...
We will see in the next lesson the exact role of each template.

If the functionality of WordPress are not enough, it is possible to add installing plugins created by developers.

There are thousands and relate to SEO, contact forms, navigation, image gallery, sharing modules ... They can be applied to the backend (administration) or the front-end (the site) or both.

A plugin, what is it?
A plugin is also a folder but is placed in wp-content / plugins. It contains mainly PHP files, but can also have style sheets, images, JS ...

In sum, the themes for web designers, plugins for developers. And WordPress to hold the candle.


Previous
Next Post »