ok la.. let me start it out,
ok children, this is the most basic of the 'front' page sturcture could be... (please make sure reti (x)html and css, please dont ask of what could be consider as a stupid q)
btw, kita mula design 2 column la.. a single header, one footer, fixed-width style.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats please -->
<style type="text/css" media="screen">
@import url( <?php bloginfo('stylesheet_url'); ?> );
</style>
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_get_archives('type=monthly&format=link'); ?>
<?php //comments_popup_script(); // off by default ?>
<?php wp_head(); ?>
</head>
<body>
<div id="container">
<div id="header"><h1><?php bloginfo('name'); ?></h1></div>
<!-- COPY DARI SINI -->
<div class="post">
<h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" ><?php the_title(); ?></a></h2>
<div class="post-info">Posted by <?php the_author(); ?> on <?php the_time('F j, Y'); ?>. <?php _e(""); ?> <?php the_category(',') ?> <?php comments_popup_link(__('No Comment'), __('1 Comment'), __('% Comments')); ?></div>
<?php the_content('View all content of this post »'); ?>
<?php trackback_rdf(); ?>
-->
</div>
<?php endwhile; ?> <!-- end loop loop -->
<?php else : ?>
<div class="post">
<p>no result, cowboy !</p>
<?php endif; ?>
<!-- HABIS COPY KAT SINI -->
<div id="sidebar">Siebar content goes here</div>
<div id="footer">footer content goes here</div>
</div> <!-- closing tag untuk div with id container -->
ikut arahan, copy dari yg aku tulis hingga yg sepatutnya, open a text-editing software, paste.. akan dapat
<div id="content">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- Start loop -->
<div class="post">
<h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" ><?php the_title(); ?></a></h2>
<div class="post-info">Posted by <?php the_author(); ?> on <?php the_time('F j, Y'); ?>. <?php _e(""); ?> <?php the_category(',') ?> <?php comments_popup_link(__('No Comment'), __('1 Comment'), __('% Comments')); ?></div>
<?php the_content('View all content of this post »'); ?>
<?php trackback_rdf(); ?>
-->
</div>
<?php endwhile; ?> <!-- end loop loop -->
<?php else : ?>
<div class="post">
<p>no result, cowboy !</p>
<?php endif; ?>
</div>
tambah kod call function ni kat line paling atas...
<?php get_header(); ?>
so akan jadi la macam ni,
<?php get_header(); ?>
<div id="content">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- Start loop -->
<div class="post">
<h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" ><?php the_title(); ?></a></h2>
<div class="post-info">Posted by <?php the_author(); ?> on <?php the_time('F j, Y'); ?>. <?php _e(""); ?> <?php the_category(',') ?> <?php comments_popup_link(__('No Comment'), __('1 Comment'), __('% Comments')); ?></div>
<?php the_content('View all content of this post »'); ?>
<?php trackback_rdf(); ?>
-->
</div>
<?php endwhile; ?> <!-- end loop loop -->
<?php else : ?>
<div class="post">
<p>no result, cowboy !</p>
<?php endif; ?>
</div>
SAVE AS INDEX.PHP ... except in lowercase, voila.. kan senang.. anybody care to continue ?
=====================================================
untuk itu, kau leh create file 404.php
maksudnye, if post atau file tu tak dijumpai, wordpress akan redirect ke 404.php
k la, aku taknak kacau korang buat tutorial. dah2. gi sambung. he3.
-cypher.
aku rasa tak jadi gak la.. sama je kalau aku letak kat index.php, aku nak kiranya konon kalau orang tu tersalah kategori (or kategori kosong) kuar ayat lain dari bila seumone tu salah bile salah url..