Tuesday, October 25, 2016

Create a Simple Wordpress Theme

 

What is a Wordpress Theme?


A Wordpress theme is a collection of documents that enables us to control the layout of our site. The themes are made up html code along with PHP code and even Javascript and CSS files.

What are the basic files to create a theme?

To create a simple theme we need to files at least:

1. style.css
2. index.php

Other important files to consider are header.php as well as footer.php. These two files are not mandatory but are always included in any theme. 



What information must be placed within the CSS file?

As a comment, the following lines must be included at least:

/*
 Theme Name: The name of the theme

Author: Your Name
Author URI: URL of the site of the author
Version: The version of the theme, for instance 1.0, 2.5 and the like

*/




What is  the loop in Wordpress?

The loop is the PHP code provided by Wordpress to iterate through the posts so that we can display the content of each one.

What is the header.php?

It´s the document in which the PHP code for the header of the page is placed. It contains the DOCTYPE, the <html> tag,  the HTML header <head></head> and the opening tag <body> which defines the beginning of the content that displays to the browser. 



What is the footer.php?

It´s the file that holds the code for the footer of each page of the site. In this file the closing tags </body> and </html> are found. 

Check the video below on how to create a simple Wordpress theme:



Friday, October 21, 2016

What is Wordpress?




Wordpress is a CMS (Content Management System) that allow us to create websites or blogs. Nowadays, Wordpress is the most popular CMS since around 15-20% of all websites on the internet use it. It´s extremely popular beacause of  the ease of use as well as the huge community that gives support to it. 

 

What are pages and posts in Wordpress?


Basically, a site based on Wordpress consists of  Pages and Posts. Pages are fixed pieces of information that are orginized hierarchically while posts are publications ordered chronologically. Both are very similar and distinguishing between them is a bit difficult at the beggining. 

Posts can be added labels which are keywords that describe the content of a given publication. Meanwhile pages cannot use labels. Moreover Posts can be ordered by using Categories which help the visitors find them faster when browsing the site or blog. 

One important feature is that posts are commonly organized chronologically on  the homepage when it comes to blogs.  Therefore when a visitor enters the blog the first page displays with  the most recnt publications on top of  the page. 

One important consideration is that  Blogs display posts while Websites display pages. Nevertheless, sometimes we can find combinations where Websites contain a blog. 

 What are the themes in Wordpress?


Themes control the appearance of a site or blog that uses Worpress. Themes are a collection of files that work together to crate the layout of the blog or site in Wordpress. Thems are made up of files such as HTML files, CSS files, Javascript files, HTML files and even images. 

One importat feature of Wordpress is that it enables customization of the themes so that if the owner of a site  doesn´t like the layout of the site or blog then it can be shiften by customizing the them or even by creating a completely new one from scratch. 


What are the plugins in Wordpress?


In Wordpress, plugins permit blogs or sites to be added new features. Plugins are programmed by using PHP  and javascript files. Wordpress has a repository of free plugins where you can dowload free and user-friendly plugins to add features to your site or blog. 

The following video shows a great introduction to Wordpress as a CMS: