Introduction to WordPress

Free, Open Source Content Management System

WordPress

  • Free and open source, built by hundreds of
    volunteers—https://make.wordpress.org
  • Content management system—a few theme files
    can be used to generate an infinite number of
    site pages using content stored in a database

Technologies

  • HTML/CSS—Used by front end developers to create and customize theme layouts/ (Some HTML/CSS is generated dynamically by WordPress.)
  • JavaScript—provides interactivity, animation
  • PHP–used to populate a webpage with content from a
    MySQL database
  • MySQL—open source database (backend) containing all the content that appears (not otherwise hard-coded) in the pages

Pages and Posts

  • PAGES are more-or-less permanent
    components of a website. They provide useful
    info for a long period of time
  • POSTS are for timely information that is
    valuable for a specific period of time, such as
    news items, events, or blog articles

Page

Post

Post Page: List of posts

Static Vs. Changeable Content

  • Content that stays the same from page to page
    is “hard-coded” into the site theme templates.
  • Content that changes from page to page is
    stored in a MySQL database and loaded into
    the page templates using a php “Loop”.

The Loop

  • The Loop is PHP code used by WordPress to
    display posts (titles and content.) Note that pages
    behave like posts as far as retrieving content
    through the loop.
  • A PHP if/else statement: WordPress asks the
    database if there are any posts. If and while there
    are if, display some information about each one;
    otherwise display an error message (or show
    nothing at all.)

The Loop

<?php
  if ( have_posts() ) {
    while ( have_posts() ) {
       the_post();
       the_title();
       the_content();
     } // end while
  } // end if
?>

The Loop

The Loop can be limited to displaying only
certain posts, for example those files in specific
categories or with certain tags.

Install

  • wp-config.php—files that associates and connects a
  • wp install with a particular MySQL database
    • wp-content folder
    • plugins—add features to a wp install
    • themes—design frameworks
    • uploads—contain the media files embedded into
      pages and posts

 

Dashboard

  • Posts (cats and tags) (permalinks)
  • Media
  • Pages
  • Comments
  • Appearance
    • Themes
    • Widgets
    • Menus
  • Plugins
  • Users
  • Settings

Dashboard

  • Appearance
    • Menus
  • Plugins
  • Settings

Themes & Child Themes

As explained at codex.wordpress.org, a Child Theme “inherits the functionality of it’s parent”. They are the best way to modify an existing (parent) theme. You can alter CSS rules an create alternative template pages, without modifying the parent theme files. Any new style
or page in the Child overrides that functionality in the Parent.

 

Themes & Child Themes

Reasons for using a child theme:

  • If you modify an existing theme and it is updated, your changes will be lost. With a child theme, you can update the parent theme (which might be important for security or functionality) and still keep your changes.
  • It can speed up development time.

Plugins

  • Akismet
  • Google Analytics by Yoast
  • Contact Form 7
  • JetPack
  • Nivo Slider
  • WordPress SEO

WordPress CMS

Art 320: L4 WordPress

By shadow4611

Art 320: L4 WordPress

  • 881