How to Create a WordPress Site Based on HTML and CSS
First, setup WordPress. This example uses TT (=Trondheim Tips) as the mnemonic. I used:
IP: 127.0.0.1:83
SQL: 3309
List: 441
Suffix: -3 for the wordpressMySQL-3 and wordpressApache-3 services running
Directory: C:\*HLQ*\ttwordpress-4.1-0 where *HLQ* is replaced with the actual high level dir name
Logon for the PHP Admin is: http://127.0.0.1:83/phpmyadmin/ use root for the userid
Then, download this blank WordPress theme from here: http://html5blank.com/
This will be a simple site, with one main page, and several secondary pages. The header and footer will be consistent for all the pages.
If you have any plug-ins installed, deactive them all, for now.
Add Pages. For this example, the first page is called Title, and secondary pages are:
Story Page
Article Page
Reference Page
Links Page
National Page
Religion Page
Military Page
Student Page
Calendar
Use the Order field on the right of the Add Page screen to order the pages for the WordPress default Navigation
Select the Settings/General screen to enter the Site Title, Date Format and Time Format. Be sure to Save Changes.
Select the Settings/Reading screen, and select Front Page Displays A Static Page, and select Title as the Front Page. Be sure to Save Changes.
Select the Appearance/Editor screen, and click on the Header page on the right. The WordPress editor is horrible, so you may want to use another one; I use Eclipse. The header.php file is in the C:\*HLQ*\ttwordpress-4.1-0\apps\wordpress\htdocs\wp-content\themes\html5blank-stable\html5blank-stable
Perhaps this can help with the Elipse configuration: http://www.javaguicodexample.com/pdtphpwordpress.html
In the header.php file, do the following:
Remove the wrapper div
Remove the existing shortcut icon.
Add a new shortcut icon in the same place.
Be sure to click Update File.
In the footer.php file, do the following:
Remove the wrapper /div which corresponds to the div in the header.php
Be sure to click Update File.
In the page.php file, do the following:
Note that the page.php file calls both the header.php and footer.php scripts.
Remove the entire line with this: 'the_title()'.
If you don't want a sidebar (and who does?), remove the get_sidebar() line.
If you don't want comments, remove the comments_template line.
Be sure to click Update File.
WordPress Variables
-Admin-
Name
Type
Description
$pagenow
(string)
In wp-admin
$post_type
(string)
In wp-admin
$allowedposttags
(array)
$allowedtags
(array)
$menu
(array)
-Version Variables-
Name
Type
Description
$wp_version
(string)
WordPress version
$wp_db_version
(int)
Version of the database
$required_php_version
(string)
Version of PHP required
$required_mysql_version
(string)
Version of MySQL required
-Browser Name-
Name
Type
Description
$is_gecko
(boolean)
FireFox
$is_chrome
(boolean)
Google Chrome
$is_IE
(boolean)
Internet Explorer
-Webserver Name-
Name
Type
Description
$is_apache
(boolean)
Apache
$is_IIS
(boolean)
IIS
-Page Variables-
Name
Type
Description
Internals
$post
text
Text of the post
post_author, post_date, post_content, etc
$page
Integer
Number of the page
$numpages
Integer
Number of total pages
$pages
Array
All the pages
$more
Boolean
More pages?
$multipage
Boolean
More than one page?
-User Variables-
Name
Type
Description
Internals
$current_user
text
User
$super_admins
array
Set this in wp-config.php to override users in the db.
-Template Tags-
Name
Description
Example
the_title()
Gets the title
the_author()
Gets the author
the_category()
Gets the category
the_ID()
Gets the unique ID of a posting
the_permalink()
Gets the URL
the_time()
Gets the date and time the post was published
the_tags()
Gets the tags attached to the post
edit_post_link()
Shows the annoying "edit" link at the bottom of the screen.
comment_form()
Shows the annoying comment boxes.
-Posting Parameters for Query-
Name
Description
Example
p=#
For an individual posting id#
monthnum=#
For an individual posting month
number#
day=#
For an individual posting day#
year=#
For an individual posting year#
author=#
For an individual posting author#
ignore_sticky_posts
Skip them
Let's create a simple and clean WordPress Theme for Dr. Vijay
First, create a site called www.vijay.no on the Kenny server.
He wants a header, a footer, and two side-by-side pictures.
The left picture will be fixed, and the right picture can change daily.
No sidebar. Because sidebars are ugly.