phpeveryday.com

The best tutorial of php, php framework, php strategies, object oriented oriented,


Wordpress - Theme: Writing First Code

Tag: wordpress, theme   Category: Web Design, PHP Application
post: 28 Jan 2008 read: 1,237


Wordpress theme step by step tutorial - part 2: We have build basic structure file for own theme at here. And we just get blank page, because we didn't write any line code. At this post, we try to show a article at front page. So, we will write simple code.

Open "index.php", enter following code:

<?php
if(have_posts()){
   	the_post();
   	the_title();
}
?>

Open your browser. Point to http://localhost/wordpress. You will get like this:

wordpress theme - result first code

Now, we will try to loop and show all posts:

wordpress theme - loop all post

You will get:

wordpress theme - loop all post



Series this article:
Wordpress - Theme: Installing and Changing Theme
Wordpress - Theme: Building Your Own Theme
Wordpress - Theme: Writing First Code
Wordpress - Theme: Wordpress Code Style
Wordpress - Theme: Showing the Post Excerpt on the Front Page
Wordpress - Theme: Showing Category Name for Each Post
Wordpress - Theme: Showing a Post with Date and Author
Wordpress - Theme: Planning Theme Design
Wordpress - Theme: Writing Basic Code for Two Column
Wordpress - Theme: Splitting Index Become Some Small Parts
Wordpress - Theme: Uniting Various Small Parts
Wordpress - Theme: Separating Stylesheet From Header
Wordpress - Theme: Designing Simple Header
Wordpress - Theme: Placing Content to Body
Wordpress - Theme: Showing Archives, Categories, Links in Side bar
Wordpress - Theme: Creating Footer
Wordpress - Theme: Modifying Single Post Display
Wordpress - Theme: Showing Comments at Single Post
Wordpress - Theme: Showing Comment Form
WordPress - Theme: Showing Trackback,RSS, and Other Detail at Single Post
WordPress - Theme: Showing Title and Other HTML Header
WordPress - Theme: Making Theme Widget Enabled

| Give Your Opinion | Recommend
Share and Bookmark to: These icons link to social bookmarking sites where readers can share and discover new web pages.
digg del.icio.us technorati Ma.gnolia BlinkList

Recommended articles by other readers:
Web Services: How PHP Kiss VB.NET? (Part 1)
Chart: How to Build Cool Animation Real Time Chart
Joomla: Fast Road to Understand Component Programming
Email: Send Attachement Mail
mod_rewrite - Part 1: create your "fantasy" URL

What do You Think?
Your Name *:
Email *:
(Will not be published)
Website/URL:
Your Comment *:
* Required


615
posting